Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #225796

    I know of a site that uses Enfold and has a stock quote in the header (non-fixed header with social icons and additional navigation), and they’re doing so via a WP plug-in. I desire to do virtually the same thing, and I’ve installed an appropriate plug-in that gives me the shortcode to use. However, my insertion of the shortcode in the “Phone Number or small info text” field was met with no success. How can I accomplish this?

    (The site referenced that has the content already is

    • This topic was modified 6 years, 7 months ago by  njsanders1.

    Hey Nick!

    They have added in that div container to the header.php file and then probably used do_shortcode or added in the php call from the plugin/raw code.

    Best regards,


    So, for a non-programming-guy like me (hence my decision to use WordPress), what’s the easiest way to recreate that outcome? What code would I need to put in the header.php file?

    I’m assuming the syntax to use do_shortcode is”
    echo do_shortcode('[whatever_my_shortcode_is]');

    But how do I put a div in the header?



    You can edit header.php, find this code on line 92:

    <div id='header_meta' class='container_wrap container_wrap_meta'>
                      <div class='container'>

    Create a new div below then use the do_shortcode function. Referring to the site, maybe you add something like this:

    <div class="stockQuote">
               <?php echo do_shortcode('[whatever_my_shortcode_is]');  ?>                       




    I solved my problem with “Code Block” component. Check “Deactivate markup” option.

    Example code here:

    <div style="padding-bottom:10px;color:#ffffff;font-size:40px;" class="av-special-heading av-special-heading-h1 custom-color-heading blockquote modern-quote  avia-builder-el-6  el_before_av_textblock  avia-builder-el-first   av-inherit-size">
        <h1 class="av-special-heading-tag" itemprop="headline">

    Hope this helps.

    • This reply was modified 3 years, 7 months ago by  hayatbiralem.

    I found another solutions but we need some hack for that.

    Go to enfold\config-templatebuilder\avia-shortcodes\heading.php

    Find if($heading)


    if( empty($heading) && ! empty($content) ) {
        $heading = do_shortcode($content);

    And use “Text Block” component with this shortcodes:

    [av_heading tag='h1' padding='10' heading='' color='custom-color-heading' style='blockquote modern-quote' custom_font='#ffffff' size='40' subheading_active='' subheading_size='30' custom_class=''][post_title][/av_heading]

    If the enfold team will use the heading value as content in the future, rather than as an attribute, we can also use the custom heading component directly like this: [post_title]


    Sorry! My last two comments belongs to this topic:

    Very sorry.



    Great! Thanks for sharing. :)


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

The topic ‘How can I add shortcode content to the header?’ is closed to new replies.