New Landing How can we help? Themeforest Theme Support Dante Do Shortcode in Header Layout 2

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #86740
    Noahj
    Member
    Post count: 59

    Hi,

    Where at in sf-header (I suppose) can I add a do shortcode function to add a opt-in in header layout #2?

    See screenshot http://drop.diamonddedication.com/EJET.

    Here is the code real quick if it helps speed things up.

    See code @ http://drop.diamonddedication.com/26nj.

    I’m just a bit thrown off on how to do the echo do_shortcode with how this code is set up. Should I do just a “.do_shortcode” like how you have throughout other coding?

    NOTE: I want this IN PLACE of the Personal Shopper which stays on header layout 2. I’ve added the personal shopper button to the top bar menu instead already (but not in the screenshot).

    Thanks SwiftIdeas!

    #86765
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Have you managed to do this? I noticed you marked the topic as resolved?

    – Kyle

    #86785
    Noahj
    Member
    Post count: 59

    Yes, of course!

    I was making the mistake of using quotes “[shortcode]” instead of ‘[shortcode]’ in the code do_shortcode.

    Here is the code and screenshot if anyone is interested.

    
    } else if ($header_layout == "header-2") {
    			
    			$header_output .= '<header id="header" class="clearfix">'. "\n";
    			$header_output .= '<div class="container">'. "\n";
    			$header_output .= '<div class="row">'. "\n";
    			$header_output .= sf_logo('col-sm-4 logo-left');
    			$header_output .= '<div class="header-right col-sm-8">' .do_shortcode('[Your_Shortcode_Reference_Here]').'</div>'. "\n";
    			$header_output .= '</div> <!-- CLOSE .row -->'. "\n";
    			$header_output .= '</div> <!-- CLOSE .container -->'. "\n";
    			$header_output .= '</header>'. "\n";
    			$header_output .= '<div id="main-nav" class="sticky-header">'. "\n";
    			$header_output .= sf_main_menu('main-navigation', 'full');
    			$header_output .= '</div>'. "\n";
    
    #86787
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Great! Thanks for sharing

    – Kyle

    #86820
    Noahj
    Member
    Post count: 59

    No problem!

    Thanks always for the great support!

    #86858
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Thanks @Noahj, we’re happy to help 🙂

    – Ed

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register