Replace shortcode in substring

Check the $str with get_shortcode_regex(). If $match is returned, you need to parse $str with do_shortcode() and then return it, else false proceed. GetShortCodeRegEx DoShortCode UPDATE After Sleeping, and while researching to answer your comment, has_shortcode() should be replaced by get_shortcode_regex(), which I have done in my original above.

how to make URL link query string

This is how I got it working: ADDED this to functions.php: function include_template_function( $template_path ) { global $wp; if ($wp->request == ‘state’) { $template_path = locate_template( array ( ‘state.php’ ) ); } return $template_path; } $state_name = $_GET[‘st’]; //this is added to use as a global variable ADDED THIS to header.php because WP thinks it’s … Read more