JetPack has a great Related Posts module, here’s how to move it further down the page below posts meta info or anywhere else you like by using a shortcode provided by JetPack.
In Genesis Themes for instance, it positions itself in the genesis_entry_content hook at the bottom. Lets say you wanted this below the post meta category information.
Well, JetPack has a shortcode that you can use to position the related posts where ever you like.
So when the above snippet is added to functions.php the default position is removed in the first function and in the second function the JetPack shortcode is used to reposition it using the genesis_entry_footerhook at a lower priority.
For a non-Genesis theme you would just add the shortcode to your PHP template files where you want the related posts to appear at a different position.
<?php echo do_shortcode([jetpack-related-posts]); ?>
4 comments
di sekitar
wow this really work, thanks
now my share button go above my related post.
Thea
Hi Guys
I was hoping to ask a quick question re this code please. Sorry probably a silly question but I’m not great at this code stuff. When we copy the code do we take out the bits in grey like remove the opening php tag and remove jetpack related posts and reposition jetpack related posts somewhere else and the use required hook for position. At first this last one was the only one I thought I had to take out but after having a closer look I am not so sure. Perhaps we simply copy from the word function. Come to think of it, when you say add to functions.php does that mean just your normal php file or something else?
Thanks in advance and again sorry for the stupid question!
Thanks
Thea
Neil Gowran
Hi Thea,
You can leave in the bits in grey as they are comments and have 2 backslashes before them which says to PHP to ignore them but yes remove the opening PHP tag and the functions.php file is the one inside your theme.
Bappi
Thank you, Dear from the core of my Heart….
many thanks .
good bless you..