Archived topic
Show Related Posts without plugin
8 replies · Started by Sagar on June 8, 2020
Hi there,
I want to show related posts in the sidebar and after the content. I don't want to use any plugin because they slow down the websites like Yarrp and others.
Is there any code or something like in other themes. I request Tom to create a related post plugin, especially for GP users.
Please help me with some code.
Thank you.
Hi there,
Related Posts is something that requires a plugin.
You may want to research plugins that display posts related just by Categories for example. They will not have the performance impact on your server like YARRP does.
Hey,
I have seen one of the methods of creating related posts through your plugin WP show posts. Use this plugin and activate the Element module.
Add this code in the hook in order to show the related posts by Category:
-------
I found this in this blog: https://www.wplogout.com/display-related-posts-in-generatepress-theme/
Could you please check this code and let me know so that I can add it on my website without installing any other related post plugin except yours WP show posts.
I was trying the same thing as you, and I ended up using this code
https://www.hongkiat.com/blog/wordpress-related-posts-without-plugins/
but i prefer to use WP SHOW POSTS in an element
This blog post from the Merch site in the GP library explains how and where to add the code:
Following https://gpsites.co/merch/the-single-post/ I get an error at home page.
The home page appears as a tablet.
The related posts element is appearing on home with the message 'There has been a critical error on this website'
GenerateBlocks 1.3.3
GenerateBlocks Pro 1.0.3
GP Premium 2.0.2
WP Show Posts 1.1.3
WordPress 5.7.2
Hi there,
theres a better method of using WP Show Posts to display posts within the same category - see here:
https://generatepress.com/forums/topic/related-popular-posts-widget/#post-1785158
Great!!
It's working now
Glad to hear that