Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
I am not good at Regex but do_shortcode will basically will not parse any shortcode in the attributes, this might help you out: add_filter(‘the_content’, function($c){ $pattern = ‘/<span\s*(.*?)data-value=[“\’]?\[(.*?)\][“\’]?\s*(.*?)>\s*(.*?)\s*<\/span>/si’; $c = preg_replace_callback($pattern, function($c){ return isset( $c[2] ) ? str_replace( $c[2], do_shortcode(“[{$c[2]}]”), $c[0] ) : array_pop($c); }, $c); return $c; });
How to make shortcode output display where I choose
WordPress 4.7 Galery shortcode not working
Plugin shortcode won’t work on a custom template file [closed]
Depending on what post editor you are using: Classic – make sure to switch the editor to “Text” instead of “Visual”. The latter will output anything you write in a form of text, while the first one will process the shortcode. Gutenberg – find a plus sign in the top-left area of your WordPress dashboard … Read more
$args = array( ‘post_type’ => ‘brand’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘brand-categories’, ‘field’ => ‘name’, ‘terms’ => get_queried_object() ) ), );// end args
Looking for a solution – slightly convoluted problem
Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
I believe @One Trick Pony was right. Shortcode widgets have no ID, so I’ve found a way around. Firstly I used PHP rand function: $var = rand(); And then added the “var” to the ID, so it doesn’t collide with other shortcodes calling the same widget (each one has different random number at the end … Read more