ThemeShaper Forums » Thematic


Gallery theme and YAPB

(1 post)
  • Started 11 years ago by tommo77funk
  • This topic is not resolved


  1. Hi,

    I am trying to use YAPB bulk uploader with the gallery theme for a friend who has thousands of images and would really like to use the gallery theme, well the functions of it anyway. Please see

    I am trying to avoid the process of uploading and copy and pasting the urls of main image and thumbnail into each post. The main image in the post is fine, but I would like to use the template thumbnail command from YAPB in my functions.php where the thumbnails for gallery theme are inserted on index page.

    This is the normal code

    <div class="entry-content">
    <?php childtheme_post_header() ?>
    "><span class="slide-title"><?php echo the_title(); ?></span>
    <img class="thumbnail" src="<?php if(get_post_meta($post->ID, 'thumbnail', $single = true)){echo get_post_meta($post->ID, 'thumbnail', $single = true);} else{bloginfo('url'); echo "/wp-content/themes/gallery/images/thumbnail-default.jpg";} ?>" width="300" height="200" alt="<?php echo the_title() ?>" />

    </div><!-- .post -->

    This function is from YAPB for thumbnail insertion

    <?php echo yapb_get_thumbnail('<div>', array('alt' => 'This is a thumbnail', 'rel' => 'lightbox'), '</div>', array('w=200', 'q=90'), 'thumbnail'); ?>

    I have been trying to combine the code for a few days and well... now really need some help and advice.

    I guess it is possible to not even worry about the template code if I could just direct the thumbnail call for 'gallery theme' to the directory where the YAPB thumbnails are created. The only problem with this is in test with the gallery theme, both thumbnail and main images get uploaded to the same gallery, with the thumbnail being renamed after upload with a number at the end example, bug.jpg (main image) bug2.jpg (thumbnail).

    I figure this automated process for the gallery theme would be really very useful.

    Would be really grateful for any advice on this matter, has anybody accomplished this already ? or has everybody who has made a gallery theme gone through the process of uploading and pasting url's, which is fine for not so many images, but if I have thousands what would be the best way to automate the process of adding thumbnails ?

    Many thanks and best wishes,


    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.