• Resolved Maurizio Zani

    (@mauriziozani)


    Hi, it’s not clear to me in which php file (and where, within this file) add the code

    <?php echo do_shortcode( ‘[custom-related-posts]’ ); ?>

    in order to show the related posts at the end of the post…

    PS: I’m using the Classical Editor

    • This topic was modified 2 years, 4 months ago by Maurizio Zani.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Brecht

    (@brechtvds)

    You’d use that code if you’re editing your theme files directly. In the classic editor you basically just type in the shortcode as is: [custom-related-posts]
    https://help.bootstrapped.ventures/article/160-displaying-related-posts

    Thread Starter Maurizio Zani

    (@mauriziozani)

    Thanks, but in that case I must add the code in EACH post, that’s why I’ve recalled the php code hoping was the correct way…

    Plugin Author Brecht

    (@brechtvds)

    Yes, that can indeed be resolved by editing your theme files and adding in that PHP code. But an easier way would be to use the widget. That should show up on every page as well.

    Thread Starter Maurizio Zani

    (@mauriziozani)

    In this moment I’m using the widget (see for example https://www.mauriziozani.it/wp/?p=11279), but in this case the related posts list cannot be under the text post…

    Plugin Author Brecht

    (@brechtvds)

    That depends on the theme. Some themes have widget areas both in the sidebar and at the end of the post content. Others don’t have that option.

    With those themes you would need to edit their single.php file and put the PHP code in there. Which does require a little bit of coding knowledge.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show related posts at the end of the post’ is closed to new replies.