Shortcode tags appear on mobile themes

Mobile theme plugins typically sniff the user agent and just switch out your main theme for a bundled “mobile friendly” generic one. In the process, any shortcodes registered in your theme are no longer recognised, and they just display as plain text. Check out the plugin documentation, or contact the developer, and see if they … Read more

php string inside shortcode does not work

this should work <?php echo do_shortcode(‘[shortcode_products_by_brand title=”Promozioni” per_page=”12″ columns=”4″ orderby=”title” order=”desc” brand=”‘. $entity->getSlug() .'” operator=”IN”]’) ?>

How do I use “while” and “end while” inside of the echo do_shortcode with ACF Repeater?

You need to generate the shortcode within the loop, and then execute it afterwards: if ( have_rows( ‘homepage_slider’ ) ) { $shortcode=”[ux_slider timer=”4500″ arrows=”true” bullets=”true” auto_slide=”true” nav_color=”light”]”; while ( have_rows(‘homepage_slider’) ) { the_row(); $shortcode .= ‘[ux_banner bg=” ‘ . get_sub_field( ‘slider_image’ ) . ‘ ” height=”600px” text_color=”light” text_align=”center” text_pos=”center” text_width=”70%” parallax_text=”0″ parallax=”3″ effect=”sparkle”] <h1>’ . … Read more

Iterate through each menu item into a shortcode

Skimming through the core file, there are some quick & dirty ways available (untested): ! is_admin() && add_filter( ‘wp_nav_menu_items’, ‘do_shortcode’ ); ! is_admin() && add_filter( ‘the_title’, ‘do_shortcode’ ); ! is_admin() && add_filter( ‘walker_nav_menu_start_el’, ‘do_shortcode’ ); But I would rather target the menu labels directly with for example (untested): /** * Support shortcodes in the menu … Read more

wordpress Shortocode running twice?

Try this way, it’s not the proper way to figure it out but it will solve your problem. function citrusafterpayment_function() { static $calls = 0; if($calls == 0){ $calls++; mail(‘[email protected]’,’check-in’,’asd’); global $wpdb; if(isset($_REQUEST[‘TxStatus’]) && $_REQUEST[‘TxStatus’] != ”) { if($_REQUEST[‘TxStatus’] == ‘CANCELED’) { $return_msg = ‘<div class=”row-fluid”><div class=”span12″> <div class=”error”>You have canceled your transaction.</div></div></div>’; return $return_msg; … Read more