WordPress.org

Support

Support » Plugins and Hacks » Yet Another Related Posts Plugin (YARPP) » Related posts in Edit screen don't match what displays on post

Related posts in Edit screen don't match what displays on post

  • I only noticed this after I updated to 3.5.1. The related posts I see when in Edit Post appear to be correct, but they don’t match what actually displays on the frontend. On new posts, the most recent posts are displaying instead; on older posts, what’s displaying does appear to be related posts, just not necessarily the same ones I see in the admin.

    Is there a recorded reason for a discrepancy between the two?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The only differences should be the order that they’re displayed in and the number… the actual results should be the same.

    Are you maybe using some caching plugin? What happens if you modify the content and update your post?

    I’m having a similar problem.

    The “Related Posts” shown for a post in the backend of WordPress are more or less a perfect match, but looking at the post itself (ie at the front end) I have different, less well-matched, posts and it’s the same 6 related posts appearing on all blog posts.

    For example:

    http://www.stravaiging.com/art-design/calton-hill-and-the-scottish-national-portrait-gallery/

    http://www.stravaiging.com/edinburgh/the-royal-botanic-garden-edinburgh/

    http://www.stravaiging.com/edinburgh/a-rooftop-view-of-edinburgh/

    I’m not using a caching plugin, and am using a custom template:

    <?php if ($related_query->have_posts()):?>
    
    <div class="row brown">
    <div class="block-heading2 font30 font-white">Related pages</div>
    	<div class="column grid_12">
            <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
                    <?php
                        $img = '';
                        if ( has_post_thumbnail() ) {
                            $img = get_the_post_thumbnail( $post->ID, 'thumbnail',  array( 'title' => $title, 'alt' => $title ) );
                        }
                        else {
                            $attachments = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image',  'numberposts' => 1 ) );
    
                            if ( count( $attachments ) > 0 ) {
                                $img = array_shift( $attachments );
                                $img = wp_get_attachment_image( $img->ID, 'related-thumbnail', true );
                            }
                        }
    
                        $extra_class = '';
                        if ( $img == '' ) {
                            $img         = '<img src="http://www.domain.com/noimage-150x150.jpg">';
                        }
                    ?>
    <div class="column grid_2">
    <div class="block150 orange shadow-half">
    <div class="block-link">
    <a href="<?php the_permalink() ?>" rel="bookmark">
    <div class="block-link-container">
    <div class="block-inner150">
    <?php echo $img; ?>
    </div>
    <div class="block-inner150">
    <div class="block-heading-centre font20 font-white link-white">
    <?php the_title(); ?>
    </div>
    </div>
    </div>
    </a>
    </div>
    </div>
    </div>
    
            <?php endwhile; ?>
    
        <div style="clear: both"></div>
    	</div>
    </div>
    
    <?php endif; ?>

    Any ideas why this is happening?

    Same here….

    Active support here…uninstall and find something that works perhaps…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Related posts in Edit screen don't match what displays on post’ is closed to new replies.
Skip to toolbar