Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #2080449
Shortcode in top area
Closed

Comments

  •  1
    chrismaynard5 started the conversation

    How can I call on a shortcode in the top area menu.

    I have a shortcode that displays whether our store is open or closed based on the time:


    [mbhi location="your location name"]

    If I past that into one of the the top area contact fields it just displays the text string and wont render the shortcode. Is there a way to use the shortcode in the top areaƉ

  •  7,095
    Oliver replied

    Hi,

    You need to edit template:

    /wp-content/themes/thegem/top_area.php

    And use do_shortcode function, take a look:

    https://developer.wordpress.org/reference/functions/do_shortcode/

    For the safety feature updates copy top area template to the child theme before the editing.

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver