Show Store Detail as Meta Tag

In case you want to display the store-related information such as store title, or store address attributes such as city state or any custom field, you can add the following code in your theme functions.php to make it appear.

/**
* 
* Add custom Meta Tag to header. 
*/
function asl_header_meta_callback() {

	global $post;


	//	Page ID of the Store Detail
	if($post && $post->ID == '2459' && defined('ASL_PLUGIN')) {

		//	Get the Store title
		$store_title = do_shortcode('[ASL_STORE field="title"]');

		//	Have Store title?
		if($store_title) {

			$store_city = do_shortcode('[ASL_STORE field="city"]');

			echo '<meta name="store-detail" content="'.esc_attr($store_title).' in '.esc_attr($store_city).'">';
		}
	}
    
}

add_action( 'wp_head', 'asl_header_meta_callback' );

In the above code, we have hard-coded the store detail page ID, in your WordPress instance, it will be different of course, so make sure to change it, we have utilized the store field render methods.