Recent posts shortcode questions

Hi there

I’m trying to have posts of a specific category on a page. Not being a coder, the quick solution I found was to use the recent posts shortcode liek so:
[recent_posts count=“99” orientation=“vertical” category=“non-classe”]

I have a few issues and I wonder if they can be solved with this shortcode or another solution is needed.

1- Padding between posts. Right now there’s not padding between posts ( How can I add padding?

2- Show post excerpt with “read more”. I tried adding show_excerpt=“true” in my shortcode but that didn’t work.

3- Number of posts per page. Is this possible.

So basically, I want the same settings as the “normal” blog page but only for a specific category. :slight_smile:


Hey Yanik,

If you want to have a category archive page, you actually do not need to create a new setup because Wordpress natively supports a category archive page.

Here’s how you can find it:

Hope this helps.

Thanks for the response Jade

Yes, I was aware of this, But I modified my archive pages CSS to look like a list so I can’t use archives for this. Also, I need a different sidebar for each post category page.

Is there another solution?

Hello @YanikPhoto,

Please be advised that the recent posts element will only display up to 4 items. If you want to display more, you will need several recent posts elements in the page and make use of the offset to make sure that it will not display duplicate items. So if you want to display 20 items, you will have to insert 5 recent posts element in the page and the offset for each element will be by 4 increments.

If you would like to display more with less hustle, please install The Grid plugin or the Essential grid plugin instead. You can install it by going to X > Validation > Extensions. For more details about this plugins, please check this out:

Hope this helps.

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