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).

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published.