Ready to get started?Download WordPress


Yet Another Related Posts Plugin (YARPP)
[resolved] Some related posts not showing images (4 posts)

  1. whatsthatbug.com
    Posted 2 years ago #

    I just updated to the latest yarpp and yarpp-experiments, but no difference. If you go to http://www.whatsthatbug.com/2012/11/06/cat-faced-spider-2/ you can see exactly what I'm talking about. All the posts have Related Posts, but a subset of those Related Posts have text but no image. And I'm at a loss.

    Any suggestions on where to look?

    Here is my template that I'm using:

    <br />
    <?php /*<br />
    Example template<br />
    Author: Archon Digital (Jonathan Cuevas) http://archondigital.com/<br />
    */<br />
    ?><h3>Related Posts</h3><br />
    <?php if ($related_query->have_posts()):?><br />
    <ul class="related-posts"><br />
            <?php while ($related_query->have_posts()) : $related_query->the_post(); ?><br />
            <?php $the_title = the_title('','',FALSE); if (strlen($the_title) > 40) { $the_title = substr($the_title, 0, 40) . "..."; } ?></p>
                    <a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><br />
    <img src="<?php echo getPostThumbnail(); ?>" alt="<?php the_title(); ?>" width="75" height="75"/></a></p>
    <p>                <div style="text-align:center">(<?php echo get_the_date('m/d/Y'); ?>)</div><a>" rel="bookmark"><?php echo $the_title ?></a></li>
    <p>        <?php endwhile; ?></p>
    <p><?php else: ?><br />
    <p>No related posts.</p><br />
    <?php endif; ?><br />


  2. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 2 years ago #

    I just looked at that link and see four related posts, which all have thumbnails. Am I looking in the right place? Do all your posts have appropriate thumbnails chosen? I'm not sure what code is behind your getPostThumbnail() function.

  3. whatsthatbug.com
    Posted 2 years ago #

    Sorry, I meant to post an update showing how I fixed it.

    http://www.clickthrough-marketing.com/how-to-fix-auto-post-thumbnail-on-wordpress-3.4-seo-friendly-800610805/ was the key.

    Also, regenerate the thumbnails using the Auto Post Thumbnail plugin.

  4. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 2 years ago #

    Good tip. Glad you got it fixed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic