Exclude a post by id from recent_posts shortcode

I edited the default post page, now you can also see the recent posts, but I need to exclude the current one by adding maybe an attribute ''exclude" so

exclude=2345

<?php echo do_shortcode('[recent_posts exclude="2345" count="3" category="Blog" orientation="horizontal"]');?>

2345 is the id of the post.

Where I can found the function of recent_posts shortcode?

I’m using pro.

Does this work for you, look at the final fixed code here:

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