We're merging with GenerateBlocks! Learn more here.

[Resolved] Auto displaying WPSP List at end of post

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Auto displaying WPSP List at end of post


Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #1457

    Hi Tom, instead of installing a separate related posts plugin, I thought I’d create a list for each posts category I’ve created. But now, instead of having to look up and drop the relevant List shortcode at the end of each post, is it possible to add something to my Child Functions.php so any post automatically adds the relevant List for the single category it’s posted in at the end of the post? I hope that makes sense!

    Thanks for your help,
    Sarah :

    I’ve just realised that you’ve included a Show Posts shortcode shortcut in the kitchen sink, so that makes things easier. Would still be interested if there’s a way of automating it though.


    You could use something like GP Hooks (in GeneratePress) to add a list below the content of every post, however there’s not currently a way to tell the list to show posts only related to the post being viewed.

    This is something I’d like to get added in the future 🙂


    Hiya Tom, can you tell me what I’d need to put in the After Content hook so that it only displays the Show Post info on the single posts (blog posts). Not sure if there is something I can do with the shortcode and css? Or do I need to do something with Function? Also any idea when you may be updating pro to include related posts? I’m just going to set it to ‘order by: Random’ for now.

    Sarah 🙂


    I’ve solved it – found something you answered in the GP Forums which has worked. I took the following advice to add the PHP code in the After Content section in GP Hooks


    To make sure it only shows up on single posts, wrap it in this conditional:

    <?php if ( is_single() ) : ?>
    <?php endif; ?>

    Then make sure Execute PHP is checked.


    Perfect – thanks for sharing the solution! 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.