I have a menu that I created in Appearance -> Menus. One of it's items is the company phone number which is set in the theme customizer. I have a shortcode that will return that number:
/* shortcode to display phone number */
function getPhone()
{
return get_theme_mod( 'contact_phone_data');;
}
/* Add shortcode */
add_shortcode('contact_phone', 'getPhone');
Is there any way to use this in the Appearance -> Menus UI? when I enter [contact_phone]
into the menu item's 'Navigation Label' field, it (as expected) displays the actual string rather than executing the shortcode.
Is there a way to indicate that the value of that field should be executed as a shortcode? If not, is there a standard way that this type of thing is handled in WP?