logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$30
Image thumbnail caption on DK theme Galary Page

Hi,

Is it possible to display image caption/description on the image thumbnail page (2 , 3 or 4 columns) of the DK theme ?

Also I'm looking for a way of opening a new page when clicking on a thumbnail image.

I still use the DK theme version with the "timthumb.php" as I do not like the DK latest version (without timthumb.php).

Appreciate if you could kindly help me to get this problems sorted out.

Thanks and Regards
Kush

This question has been answered.

Kushan | 08/01/12 at 4:53am Edit

Previous versions of this question: 08/02/12 at 9:47pm

(3) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    08/01/12
    5:08am
    Arnav Joy says:

    yes it is possible , let me know how you want it

  • avatar
    Last edited:
    08/01/12
    5:11am
    Martin Pham says:

    Hi Kush,
    I can help you, but I need access to your-site to do this.

    Regards,
    Martin

    • 08/01/12 5:27am

      Kushan says:

      Hi,

      Thanks for the reply.

      Please check the below link. I want to get a simple caption under each of these thumbnail images.

      [URL removed at the request of the asker]

      When I click on each thumbnail image, it should open a new page instead of the enlarged image.

      I have created a new theme page E.x. Theme5.php using a copy of the 4 column theme page (DK Theme).

      If I can get the required code to include in the Theme page and the CSS code that I should include in the main CSS file then I'm fine. I can do this by my self.

      Thanks and Regards
      Kush..

    • 08/01/12 5:38am

      Martin Pham says:

      OK,
      Do you want it shown in the picture attached?

      I need to see Theme5.php file structure to be able to get the caption.
      Please send this file to email: marxvn@gmail.com

      Regards,
      Martin

      Attached Image

    • 08/01/12 7:06am

      Martin Pham says:

      Try this function


      // Insert into functions.php
      function gallery_page_render() {
      global $post;
      $args = array(
      'post_type' => 'attachment',
      'numberposts' => -1,
      'post_status' => null,
      'post_parent' => $post->ID
      );
      $i = 1;
      $attachments = get_posts( $args );
      if ( $attachments ) {
      echo '<div class="sidebar_content full_width">';
      $theme_uri = get_template_directory_uri();
      foreach ( $attachments as $attachment ) {

      echo '<div class="one_fourth '. (( 0 == $i % 4 ) ? 'last' : '') .' gallery4" style="margin-bottom:0;margin-top:3%">';

      echo '<div class="shadow"><div class="zoom">Open</div></div>';

      list( $images_full ) = wp_get_attachment_image_src($attachment->ID, 'full');
      printf('<a target="_blank" href="%s">
      <img class="one_fourth_img" src="%s/timthumb.php?src=%1$s&h=200&w=200&zc=1" alt="%s" style="height: 200px; top: 0px; left: 0px; overflow: hidden;" />
      </a>',
      $images_full,
      $theme_uri,
      $attachment->post_title
      );

      $desc = ($attachment->post_excerpt != '') ? $attachment->post_excerpt : $attachment->post_content;
      printf('<div class="gallery_captions">%s</div>', $desc);

      echo '</div>';

      $i++;
      }
      echo '</div>';
      }
      }


      Open gallery page templates, inset bellow <div id="page_caption" .... </div>

      <?php gallery_page_render(); ?>


      Caption css

      .gallery_captions {
      background: rgba(0, 0, 0, .6);
      position: absolute;
      bottom: 0;
      left: 0;
      color: white;
      font-size: 11px;
      display: block;
      padding: 4px;
      height: 30px;
      overflow: hidden;
      }

    • 08/01/12 12:21pm

      Kushan says:

      Hi Martin,

      Thanks for your reply.

      I did as you have suggested. However It did not give me any results.

      I couldn't find a caption.css. Therefore I use the screen.css and interted your style commands at the end of the screen.css file.

      Nothing changed :(

      Thanks and Regards
      Kush

  • avatar
    Last edited:
    08/02/12
    12:33pm
    LatinUnit says:

    Hi i can do it, however i need to access through ftp to make the changes.

    If you are concerned about security, please make a new ftp account restricting access only to the theme's folder.

    If you are interested send me a private message with the details

    Previous versions of this answer: 08/02/12 at 12:33pm

    • 08/02/12 9:50pm

      Kushan says:

      Hi,

      Thanks for all your feedback.

      This problem has been fixed with the help of Martin Pham.

      Thanks and Regards
      Kush.

This question has expired.



Hai Bui, Arnav Joy, Manoj Raj, Kushan voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.