Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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 http://www.breitlingenergy.com.)

    • This topic was modified 10 years, 1 month ago by njsanders1.
    #225832

    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,
    Devin

    #225892

    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?

    #225977

    Hey!

    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]');  ?>                       
    </div>

    Cheers!
    Ismael

    #739683

    Hi,

    I solved my problem with “Code Block” component. Check “Deactivate schema.org 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">
            [post_title]
        </h1>
    </div>

    Hope this helps.

    • This reply was modified 7 years, 1 month ago by hayatbiralem.
    #739692

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

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

    Find if($heading)

    Replace:

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

    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]

    #739693

    Sorry! My last two comments belongs to this topic:
    https://kriesi.at/support/topic/custom-shortcode-in-special-headingheading-text/

    Very sorry.

    #741054

    Hey!

    Great! Thanks for sharing. :)

    Cheers!
    Ismael

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.