WordPress.org

Ready to get started?Download WordPress

Forums

Related Posts at bottom of single post? (2 posts)

  1. geezmo
    Member
    Posted 7 years ago #

    What codes do I add at the SinglePost.php file so that I can have relates posts right at the end of a single post/article/

    I checked the other Related Posts plugin and it seems that either they only allow it on the sidebar and not the end of the article or it's too complicated to operate when I only need a simple related posts function at the end of each single post.

  2. yosemite
    Member
    Posted 7 years ago #

    This one works for me: http://www.w-a-s-a-b-i.com/archives/2006/02/02/wordpress-related-entries-20/

    Then I add:
    <?php if (function_exists('related_posts')) echo('<p style="margin:0;">Related posts:
    '), related_posts(); ?>

    at the appropriate spot in my themes single.php.

    NOTE: Don't forget to run the script on the admin's Related Posts Options page, some tables need to be created in the database.

Topic Closed

This topic has been closed to new replies.

About this Topic