Shortcode mystery!
-
On a single page within WordPress, I call a vendor’s shortcode three times, passing in a unique ID each time:
[spacecapacity id=’spc_82789604453987133′]
[spacecapacity id=’spc_135561100581561977′]
[spacecapacity id=’spc_135557659038947762′]On screen, this briefly results in three different numbers/pieces of content — but then just as the whole page is rendered all three numbers/pieces of content somehow “refresh” to the value of the first shortcode.
As I inspect the raw HTML code that’s been generated serverside and pushed out to the browser, it is correct: Three different numbers/pieces of content. And yet what I actually see on screen is the value returned by the first shortcode, three times.
(I have gone over the Vendor’s shortcode code and all looks well to me: Each DIV it creates has a unique ID, it uses a ob_start()/return ob_get_clean(); buffer to make sure HTML is correctly captured in a buffer then returned [not echoed] out of the function, etc. etc. More, if I place each one of the shortcodes above on separate pages, all is well! They work if on separate pages.)
What is happening in a last step of the DOM rendering that might cause three shortcodes to display the same content (always the content returned by the very first shortcode on the page) despite the fact that the HTML being pushed out to the browser is correct and has different content for each of the three shortcodes?
A puzzler!
- You must be logged in to reply to this topic.