Exclude specific category from recent blog posts element

Hi there,

I am using the Ethos stack. On the home page I would like to exclude a specific category in the recent blog posts element that is linked to my blog articles.

After some research on the web, I tried to follow some instructions but it didn’t work (the support content might be too old or I might have done stgh wrong).
Here is what I did:

Could you indicate me what is the way to exclude a specific category from the recent blog posts element, knowing that the category ID I’d like to hide is “les-travaux”, and the shortcode I’m using for recent blog posts is this one:

[recent_posts count=“2” orientation=“horizontal”] [recent_posts count=“2” orientation=“horizontal” offset=“2”]

Thank you for your help

Hi There,

Thanks for writing in! You can specify which categories you want to display inside your recent posts shortcode by adding those category-slugs separated by comma.

For example:

[recent_posts count="1" orientation="vertical" category="top-10,videos,test-cat"]

Hope that helps.
Thanks!

Thank you very much, it was a much more simple way to achieve this than all the solutions I tried !
Have a good day

Glad that it . works for you!

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.