Support » Plugin: WordPress Related Posts » Related content on homepage

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey,

    thanks for reaching out!
    Sure, you can have those show on your homepage by going to your WordPress’s Dashboard and under the tab ‘Appearance’-‘Editor’ choose your theme (I think yours is “ladylucktheme”) in the upper right corner. Now click on the ‘content.php’ file, which you can find on the right hand side of your screen. After that, search for the following code in the code editor:

    [ Moderator note: Code fixed, please wrap code in backticks or use the code button. ]

    <div class="entry-content">
    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'ladylucktheme' ) ); ?>
    <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'ladylucktheme' ) . '</span>', 'after' => '</div>' ) ); ?>
    </div><!-- .entry-content -->
    <?php endif; ?>
    Now that you have found this, just add the following code line at the end of it:

    <?php wp_related_posts()?>

    So, to sum it up, the whole thing should look like this:

    <div class=”entry-content”>
    <?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘ladylucktheme’ ) ); ?>
    <?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”><span>’ . __( ‘Pages:’, ‘ladylucktheme’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
    </div><!– .entry-content –>
    <?php endif; ?>
    <?php wp_related_posts()?>
    Remember to click on the ‘Update File’ button when you’re finished. Visit your blog, refresh the whole page and you should be able to see those related posts over there.

    Did it work?
    Need any further assistance or do you have any other questions? Let me know — I’ll gladly help!

    Take care and have a nice day,

    Thank you so much Petra, worked perfectly!

    Have a lovely day x

    Happy to hear it worked 😀

    All the best,

    Hi Petra,

    I’ve just tried to follow your instructions but my theme doesn;t seem to have a content.php file – any ideas what I should do?

    site is



    Hey Chris,

    thanks for reaching out! If I am not mistaken you are using the “Fixed” theme? Unfortunately this theme is not free to use, so I can’t install it on my side. Can you make a screenshot of the files you do have?

    Looking forward to your reply,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Related content on homepage’ is closed to new replies.