I am trying to generate a WordPress shortcode which will display a bxSlider. The shortcode function itself works like a charm; I can pass my data and the shortcode is rendered properly.
In the shortcode I also added an attribute
id, which will be used to pass an ID used to call the slider, so for example:
"myid" part would be passed like
[myshortcode id="myid"]. But as the script needs to be placed in the footer (using:
add_action( 'wp_footer', 'myshortcode_function');). So, I have to call the
id attribute outside the shortcode function.
Could anybody please explain, how to pass that attribute so I can use it in another function? Please do not link me to the documentation. I read it, and I don't understand it.