- This topic has 17 replies, 5 voices, and was last updated 1 year, 12 months ago by David.
-
AuthorPosts
-
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 SupportHi Petar,
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 #2192585PetarOK, 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?thanks
<?php if ( function_exists( ‘wpsp_display’ ) ) wpsp_display( 63414 ); ?>
April 18, 2022 at 11:13 am #2192639YingStaffCustomer SupportHi Petar,
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.
3. Select
generate_after_content
hook, selectposts > all posts
as location.4. Publish it.
Let me know how it works ๐
April 18, 2022 at 5:20 pm #2192830Petarthanks.
April 18, 2022 at 5:46 pm #2192839PetarHuh..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 doing
April 18, 2022 at 7:56 pm #2192887Fernando Customer SupportHi Petar,
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"]
Kindly replace
5384576
with the ID of your list.Hope this clarifies. ๐
April 19, 2022 at 5:23 pm #2194119Petarhm…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 SupportYou 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 thetax_term
of 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 #2196381JohnI have tried this and it shows the same posts regardless of category.
How can I make it show posts in the same category?
Thanks,
JohnApril 21, 2022 at 5:54 pm #2196485Fernando Customer SupportHi John,
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 #2196917JohnHey Fernando,
It is working now.
Thanks for the response!
John
April 22, 2022 at 7:39 am #2196943JohnHey Fernando,
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”]
Thanks,
JohnApril 22, 2022 at 7:44 am #2196949DavidStaffCustomer SupportHi there,
are you using any page caching plugins or server caches ?
April 22, 2022 at 8:05 am #2197154JohnHey David,
Yes, I’m using WP Rocket.
-
AuthorPosts
- You must be logged in to reply to this topic.