[RESOLVED] W4 Post List Error: A list can load only once on the same page
This article applies if your WordPress installation is running:
- W4 Posts List
- Yoast SEO
- A visual builder (like Divi, Visual Composer or Enfold)
During the development of a client website, we started seeing the following error popping up on pages with W4 Post List shortcodes on them:
W4 Post List Error: A list can load only once on the same page
With very little solid documentation available through Google, Stack Exchange and the other usual suspects – we did a little digging and found the culpret was a combination of Yoast SEO and the visual builder that was being used (in this case, Elegant Theme’s Divi).
Here was the clue:
Note the opening phrase in the meta description: [et_pb_sec… – Yoast SEO is picking up the code from the visual builder, and using it as the default meta description. This also included the W4 Posts Shortcode – which was being triggered in the <head>, instead of where we’d actually placed it – causing the “Triggered twice” message we were seeing.
To fix this, all that was needed was to alter the meta description from the default:
Message gone, developer happy :-)