• Resolved Erik

    (@southernutahautism)


    I am attempting to have the thumbnail navigation use the automatically generated thumbnail images when an image is added to the media library.

    Right now, I have my WP media settings set to create a 100×100 thumbnail, auto crop, when an image is uploaded.

    I have verified that the images are being created (creates them as “image-name-100×100.jpg), but the promotion slider nav still pulls the full “Featured image” and then crunches it down to 50×50, which doesn’t look good at all since the images are 625×200.

    I’ve tried looking through the plugin code, and I see the line that says
    $thumb = get_the_post_thumbnail($post->ID, 'post-thumbnail');

    But for some reason, the promo slider navigation doesn’t use the thumbnail, it still pulls the full image.

    I’ve also made sure that my posts that use the thumbnails are working, and they are, the code I use to pull the thumbnail is
    <?php the_post_thumbnail('thumbnail');?> and it grabs the 100×100 generated thumbnail image.

    Do I need to enter something in the “Thumbnail” box on the promotions page, in the promotion settings dialog box? Or is there something else I’m missing here?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Micah Wood

    (@woodent)

    Thanks for catching that line of code… yes, it should be ‘thumbnail’ and not ‘post-thumbnail’ in the get_the_post_thumbnail() function.

    Because you can change the size of the post thumbnails under media settings and because 100×100 seemed a little large for the thumbnail navigation, I further size the images down to 50×50. To avoid this, you can comment out the preg_replace() function that changes the image size.

    I ought to provide an option to use the default thumbnail size or change it to something specific. You should see this change in the next update.

    Thanks!

    Thread Starter Erik

    (@southernutahautism)

    That did fix it, and they look good at 50×50 when the thumbs are 100×100 cropped.

    The plugin is pretty sweet, and if you added more options to the settings, that would make it ever better.

    In case you read this, on suggestion I have is instead of using the thumbnails navigation as “img” tags, if they were changed to div’s that were blocked out, with the image set as a background, then you could just have the WordPress thumbnails centered in the div, and the overflow set to hidden. Then people could use whatever their meida settings thumbnail is, and then the Promotion Slider navigation thumbnails would just show the image as a background, and then there’s no worry about resizing or scrunching images.

    I was going to try and modify the code to change them from img’s to div’s with backgrounds, but I am not quite skilled enough at PHP for that yet ??

    Thread Starter Erik

    (@southernutahautism)

    Did you fix this issue in your latest update? I updated to WP 3.1, and also updated the promotion slider, and it looks like the thumbnails are still working, but I don’t know if that’s because I made the change you recommended in your post, or if you updated the plugin files to have the same change.

    ??

    Plugin Author Micah Wood

    (@woodent)

    Erik, I have fixed the thumbnail nav images to properly use the WP 100×100 thumbnails. I also added a filter that allows you to use a custom size.

    In addition, I added a filter for the default image size in the slider and with v3.3.1 added the ability to change the default image size from the options panel.

    If you want to change the images to divs, you can alter the action that applies the images to the slider.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Promotion Slider] Thumbnail Navigation doesn't use post thumbnails.’ is closed to new replies.