Shortcode in Header

Discussion in 'Appointway WordPress Theme' started by lkodsmann, Sep 25, 2014.

Thread Status:
Not open for further replies.
  1. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    I'd like to use a shortcode in the header section (where the top-right contact details go) - but right now, if I put my shortcode in, it gives me the shortcode text (instead of the correct shortcode output)...

    Is there a way that I can use this top-right area in the header for shortcode purposes?

    Thanks!
    Leanne
     
  2. Yogesh

    Yogesh Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,052
    Likes Received:
    41
    Hello,

    Use following line in header.php file as shown below in screenshot.
    _do_shortcode_(inkthemes_get_option('inkthemes_topright'));
    25sep5.png
    It will resolve your issue.

    Thanks & Regards
    Yogesh Bhade
     
  3. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    Making that change in my header.php file doesn't seem to do the trick... when I make the modification in the screenshot, my homepage only displays my logo (the rest of the screen is blank/white)...
     
  4. Yogesh

    Yogesh Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,052
    Likes Received:
    41
    Hello,

    Replace code on line no. 55 in header.php file with following code.
    Code:
    <p> <?php echo do_shortcode( stripslashes(inkthemes_get_option('inkthemes_topright')) ); ?></p>
    It will resolve your issue.

    Thanks & Regards
    Yogesh Bhade
     
  5. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    That worked perfectly, thank you so much!
     
Thread Status:
Not open for further replies.

Share This Page