- This topic has 17 replies, 5 voices, and was last updated 3 months, 2 weeks ago by David.
April 17, 2022 at 6:46 pm #2191761Petar
Hi, I ‘ve just activated Generatepress on my website but somehow missed that it seemed there is no option to show related posts with thumbnails with GP? (below post).
Is there some simple way to achieve this?April 17, 2022 at 7:26 pm #2191783Fernando Customer Support
You would need a third party plugin like WP Show Posts to show related posts.
WP Show Posts is set to be merged with GenerateBlocks plugin soon as well.
WP Show Posts link: https://wordpress.org/plugins/wp-show-posts/
Hope this clarifies. 🙂April 18, 2022 at 9:54 am #2192585Petar
OK, this works when I insert shortcode in posts.
Now I want to make it sitewide. Please advise where exactly to paste the function (in what file and what row) if I want these related posts to be shown before comments on single post pages?
<?php if ( function_exists( ‘wpsp_display’ ) ) wpsp_display( 63414 ); ?>April 18, 2022 at 11:13 am #2192639YingStaffCustomer Support
You can add the shortcode to a hook element, detailed steps below:
1. Go to appearance > elements, create a new Hook element.
2. Add the WPSP shortcode into the hook element.
posts > all postsas location.
4. Publish it.
Let me know how it works 🙂April 18, 2022 at 5:20 pm #2192830Petar
thanks.April 18, 2022 at 5:46 pm #2192839Petar
Huh..this looks nice, but it seems that recommended plugin will shop posts that I define upfront? What I was looking for is to create similar and suggested posts based on content instead. Currently, the same posts are shown everywhere.
Something like YAARP plugin was doingApril 18, 2022 at 7:56 pm #2192887Fernando Customer Support
To display related posts in WPSP, you’ll need to modify the shortcode as such:
[wp_show_posts id="5384576" settings="taxonomy=category&tax_term=current"]
5384576with the ID of your list.
Hope this clarifies. 🙂April 19, 2022 at 5:23 pm #2194119Petar
hm…it seems it works but only partially. Because suggestions are more or less always the same on posts, chancing only when I change the category. As related posts “engine” is not working well.April 19, 2022 at 8:22 pm #2194192Fernando Customer Support
You can try leaving the Taxonomy blank as such: https://share.getcloudapp.com/kpuJRGP7
However, even if you have the taxonomy set –
settings="taxonomy=category&tax_term=current", it should still retrieve posts with the
tax_termof the current post.
Can you try manually typing the shortcode above? Sometimes, when copying and pasting, the quotation marks change, and this causes issues.
Tested shortcode on my end as well and it works as expected.
Kindly let us know how it goes. 🙂April 21, 2022 at 1:10 pm #2196381John
I have tried this and it shows the same posts regardless of category.
How can I make it show posts in the same category?
JohnApril 21, 2022 at 5:54 pm #2196485Fernando Customer Support
Have you tried manually typing the shortcode? If so, can you share the shortcode you’re using here?
Kindly let us know. 🙂April 22, 2022 at 7:15 am #2196917John
It is working now.
Thanks for the response!
JohnApril 22, 2022 at 7:39 am #2196943John
It was working fine and now it is just showing the same posts again in all categories.
Here is the shortcode that I am using:
[wp_show_posts id=”508666″ settings=”taxonomy=category&tax_term=current”]
JohnApril 22, 2022 at 7:44 am #2196949DavidStaffCustomer SupportApril 22, 2022 at 8:05 am #2197154John
Yes, I’m using WP Rocket.
- You must be logged in to reply to this topic.