Initialize add_action() for every copy of a specific shortcode
You can pass values by adding your own filter. Proof of concept: add_filter( ‘my_filter’, function() { return array(1,2,3); } ); function print_partners_scripts() { $args = apply_filters(‘my_filter’,null); var_dump($args); } add_action( ‘wp_footer’, ‘print_partners_scripts’ ); Where you to register and enqueue your script instead of echoing it directly to the page, you could use wp_localize-script to pass information … Read more