You’d have 2 ways to go around this:
- You could use the
[jetpack-related-posts] shortcode to display Related Posts in a text widget (reference). Shortcodes are disabled in widgets by default, but you can enable them by adding the following to your theme’s functions.php:
add_filter('widget_text', 'do_shortcode');
- You can use the
Jetpack_RelatedPosts_Raw raw object to call Related Posts anywhere you want in your theme. You can learn more about it by looking at the code here, or by checking this video (discussion about the raw object start at 30:32)
I hope this helps.
Thank you for your answer.
I implemented solution 1. How come would it not work?
- I created functions.php in my child theme (didn’t have one)
- Added
add_filter('widget_text', 'do_shortcode');
- Added a text widget like you said
And still nothing shows. I am sure it’s just my specific case, but what could be wrong?
The shortcode will only work in a loop, so you’d have to add a loop around your sidebar elements. You can read more about multiple loops here:
http://codex.ww.wp.xz.cn/The_Loop#Multiple_Loops_Example_1
Yeah but they really should make this easier.
So basically you’re saying that it can’t be done, that we can’t put the Jetpack related post widget in the sidebar?
Why couldn’t you just tell us that in the first place? Or better yet, add this feature?
I don’t know about anyone else, but I would much rather have this feature in the sidebar, and not at the end of the post. More people will see it there.
@nathaniel It can be done through one of the 2 methods I outlined above, but you’ll need to make changes in your theme.
If you don’t feel comfortable doing so, I’d suggest contacting your theme author for help, or hiring a WordPress professional via this job board:
http://jobs.wordpress.net/