Site logo

Archived topic

Related posts with thumbs

17 replies · Started by Petar on April 17, 2022

Viewing posts 1–15 of 18

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?

Hi 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. :)

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?

thanks

<?php if ( function_exists( 'wpsp_display' ) ) wpsp_display( 63414 ); ?>

Hi 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, select posts > all postsas location.

4. Publish it.

Let me know how it works :)

thanks.

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 doing

Hi 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. :)

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.

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_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. :)

I have tried this and it shows the same posts regardless of category.

How can I make it show posts in the same category?

Thanks,
John

Hi John,

Have you tried manually typing the shortcode? If so, can you share the shortcode you’re using here?

Kindly let us know. :)

Hey Fernando,

It is working now.

Thanks for the response!

John

Hey 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,
John

Hi there,

are you using any page caching plugins or server caches ?

Hey David,

Yes, I'm using WP Rocket.

This archived topic is closed to new replies.