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 […]
Category: Shortcodes
Blank shortcode output
You may want to add a shortcode to your page content on a line on its own. Even if you SHIFT+RETURN to cause a <br> after it instead of it placed in a new paragraph, if you return(”) from your shortcode you’ll still have a blank line output on the page. Return a zero height […]
Using shortcodes inside a shortcode
Use the do_shortcode() function Assigning the output of do_shortcode() to a string and returning from the function with it didn’t work in our test, but echo did
.Shortcodes General
Calling a function from post or page content Just add [my_special_shortcode] within any post or page and the function will be called Passing arguments with a shortcode In the wordpress content (N.B. keep attributes lowercase, they will get converted to lowercase) In your function Other things you can pass with a shortcode https://developer.wordpress.org/plugins/shortcodes/shortcodes-with-parameters/