Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #281285


    I have tried to use a shortcode in the small info text, but the shortcode is not interpreted, and is simply displayed as it is.
    What I am trying to do is to display a different phone number depending on where the visitor is located. I am using the “Content By Country” plugin in other parts of the website very successfully.
    Is there a way to get a shortcode interpreted in the small info text t the top right of the website?

    See the top right part of for clarity.



    Hey loyalzoo!

    Please go to Appearance > Editor and open Helper-main-menu.php file and find

    $phone			= $headerS['header_phone_active'] != "" ? $headerS['phone'] : ""; 

    and change it to

    $phone			= do_shortcode("[insert shortcode here]");  

    Best regards,


    Thanks Yigit.
    I have tried, but unfortunately that crashes the site. I think it is because my shortcode has double quotes in them. This is my shortcode:

    [CBC country=“us, ca” message=”+44 (0)20 3598 3932″]1 (617) 982 1353[/CBC]

    What is the exact string I should use?
    Many thanks for your kind help!

    Will this modification be overwritten with theme updates?



    Please change the code to following one in that case

    $phone			= do_shortcode('[insert shortcode here]');  

    simply single quote instead of double
    Edit: Yes it will. You can use a child theme to avoid that. Please see –

    Best regards,

    • This reply was modified 3 years, 5 months ago by  Yigit.

    Many thanks Yigit, now it seems to work.
    Unfortunately the CBC plugin doesn’t work as expected, so I need to figure out one issue with the developer of the plugin.
    Many thanks for your great help!
    By the way, will this change be overwritten when the theme gets updated?



    Yes it will. You can use a child theme to avoid that. Please see –
    You are welcome, we are always glad to help :) Let us know if you have any other questions or issues


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Shortcodes in small info text’ is closed to new replies.