2
votes
2answers
387 views

Creating Multiple wp_localize_script for Shortcode?

I have a shortcode that displays recent WooCommerce products in a carousel, however i would like the end user to be able to use the shortcode multiple times on the same page, currently when this ...
1
vote
2answers
355 views

Localize variable for multiple Shortcodes

I have this code for flexslider Shortcode add_shortcode('flexslider', function($atts){ global $post; $ids = explode(',', $atts[ids]); $uniqid = uniqid(); wp_enqueue_script( 'shortcode_flexslider'); ...
0
votes
0answers
132 views

Passing a location-dependent array via wp_localize_script within a shortcode

I have created a shortcode that is intended to be inserted into custom field of a music custom post type. The shortcode is coverted into an audio playlist using the jplayer jquery plugin (and it's ...
2
votes
0answers
233 views

Wp_localize_script from Shortcode [closed]

I've been trying for hours and tried several answers from here and Google but still no luck.. need help. I am making a shortcode (slider) and trying to execute a javascript file (for the slider's ...