• I have just recently added the related-posts plugin and unfortunately it displays related posts on the homepage of my theme. I wish it only to display them in the sidebar in side the blog entry itself.

    The code I thought might work was:

    <?php /* If this is the homepage don't display related posts */ if (is_home()) { ?>
    			<?php /* Display the related posts only if not the homepage*/ } elseif (is_page()) { ?>
    			You are currently browsing the archives for the <?php single_cat_title(''); ?> category.
    
    			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    			         <li><h2>Related Articles</h2>
    			 <ul>
    			 <?php STP_RelatedPosts(); ?>
    			 </ul>
          		 <?php } ?>

    Alas it doesn’t work. Any suggestions?

Viewing 1 replies (of 1 total)
  • Did you select a Page to be your homapege?
    If yes, look at your code:

    if is_page > display the plugin…

Viewing 1 replies (of 1 total)
  • The topic ‘Don’t display recent posts on homepage, but display only in post’ is closed to new replies.