You can output a shortcode from a shortcode and within that create an attribute value dynamically of course, but sharing a value from one shortcode triggered function call to another later in a page is presumably not possible.

Use javascript

.innerHTML

Use javascript .innerHTML to cause the content of something on the page to be changed once the page is loaded by the browser (which will occur after all of the shortcodes have done their thing server side).

function ()

Have your html output call a javascript function that will be created by another shortcode call, again occurring once the page is loaded by the browser (which will occur after all of the shortcodes have done their thing server side).

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.