Multiple Recent Posts shortcodes causing page content duplication bug

Hi,

I encountered a very strange bug today, and am still able to replicate it.

On my website’s home page, it was duplicating all of the content and displaying it twice in a row. I managed to fix this on that page, but wanted to report the issue.

The page has three [recent_posts] shortcodes in text elements, set in three rows with various offsets, creating a 3x3 grid of recent posts. The issue only stopped when I changed one of those text elements to use the Recent Posts element instead. It didn’t seem to matter which one I changed, but as long as there were three of those shortcodes on the page, it duplicated the content.

Hello Spencer,

Thanks for writing in! I have investigated the issue and I cannot replicate on my local testing installation. I even have 5 [recent_posts] shortcodes and it does not break my page. The issue seems unique to your site. You may have inserted invalid values or missed something. We love to check your site if you wouldn’t mind. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Secure Note has been updated

Hey Spencer,

All your Recent Post shortcodes are missing the end quote in the category attribute which is causing the issue. Please add the end " quote.

image

Working with code in general is prone to error. That is the reason why we recommend the use of Element counterparts whenever possible.

Thanks.

Ooof, my mistake. Thanks for the help!

Hi Spencer,

Glad that we are able to help you.

Thanks

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