Recent posts Short code duplication

Hello, I added the shortcode [recent_posts offset=“193”] But the cde shows the recent 3 posts+ the posts from that offset as well.
Now the total posts appear are 6 instead of 3.

Please Note the 3 extra posts which repeated every time are a Sticky posts. When I tried to unstick one post, it automatically removed from the short code,

I always repeat the code to show 9 posts, now it became 18 with the recent 3 posts appeared each time
For ex: [recent_posts offset=“193”][recent_posts offset=“113”][recent_posts offset=“306”]

Hello Ahmed,

Thanks for writing in! You are using the classic recent post shortcode incorrectly. You should be using the shortcode with an offset like this:

[recent_posts count="3"]
[recent_posts count="3" offset="3"]

The offset value is the number of post items you want to skip and not to be displayed. The shortcode above will display 6 recent post items. You will be needing the offset value in the dnd shortcode because each shortcode can only display up to 4 post items.

Hope this makes sense.

I’ve added the count number, but the problem is still present.
The short code is adding the sticky posts to all short codes from any category, from any offset, for any count

Hello Ahmed,

If you want to exclude the sticky post, please update your shortcode by using this instead:

[recent_posts count="3"]
[recent_posts count="3" offset="3" no_sticky="true"]
[recent_posts count="3" offset="6" no_sticky="true"]

The code above will display 9 items. The 2nd and 3rd shortcode should ignore the sticky posts.

Cheers.

How can I add this to 1000 blog post?
It does not make any sense

I am using the short code for long time, the problem appeared after the last update

Hi Ahmed,

Can you please share your website login credentials to check the Recent Post shortcode settings? Please include the following information:

– WordPress Site URL & Login URL
– Specific page URL where you are having this issue.
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

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