WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] Related Posts show in Post Edit window, but not on blog. (4 posts)

  1. willbrand
    Member
    Posted 2 years ago #

    Hey-

    Our site's been using YARPP for a while - and we're very happy with it - but some posts don't seem to ever generate related posts. When I look on the Post Edit page, there are plenty of related posts well over any reasonable threshold - my threshold's at 5, and for one post which shows no related posts I see five over 20 relevance. Changing the display code back to defaults doesn't help. Other posts seem to be fine. The posts in question don't seem to be technically any different from the others - no weird code adventures going on or anything, just text and images. Any ideas?

    -Will

    For reference, our display code (modified from the defaults only slightly to use Thesis's post-images, and which doesn't seem to be the problem):

    <h3>Related Posts</h3>
    	<?php if ($related_query->have_posts()):?>
    <ul>
    	<?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
    		<li>
    			<?php $post_image = thesis_post_image_info('image'); ?>
    			<?php // $post_thumb = thesis_post_image_info('thumb'); ?>
    			<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?
    php echo $post_image['output']; ?></a>
    			<a href="<?php the_permalink(); ?>"><h4><?php the_title(); ?></h4></a>
    		</li>
    	<?php endwhile; ?>
    </ul>
    <?php else: ?>
    	<p>No related posts.</p>
    <?php endif; ?>

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. willbrand
    Member
    Posted 2 years ago #

    Update: I dumped out the related posts query, and the problem seems to be that is that somehow "post_date > '2011-10-28'" got into the SQL query. We don't have that set in the YARPP options, but do we use a "Last Week" filter for another bit of code that pulls up random recent posts at the end of articles. They shouldn't be mixing, but maybe they are. I'll let you know what I find.

    [Code moderated as per the Forum Rules. Please use the pastebin]

  3. willbrand
    Member
    Posted 2 years ago #

    Yep, lesson learned: remember to remove your filters once you're done with them. My bad. Resolved.

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Glad you resolved this. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic