Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1209052
    awecesar
    Participant

    Hey,
    on my site fourtylove.com
    I would like to have a div unter the navgation div.
    Can you tell me where to add it in my child div?

    #1209064
    Rupok
    Member

    Hi there,

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #1209677
    awecesar
    Participant

    I’d like to be able to add custom html right into the x-navbar-wrap

    #1209747
    Thai
    Moderator

    Hi There,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
    Then navigate to your child theme’s /framework/views/global directory create a file named _navbar.php and paste the code below:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_NAVBAR.PHP
    // -----------------------------------------------------------------------------
    // Outputs the navbar.
    // =============================================================================
    
    $navbar_position = x_get_navbar_positioning();
    $logo_nav_layout = x_get_logo_navigation_layout();
    $is_one_page_nav = x_is_one_page_navigation();
    
    ?>
    
    <?php if ( ( $navbar_position == 'static-top' || $navbar_position == 'fixed-top' || $is_one_page_nav ) && $logo_nav_layout == 'stacked' ) : ?>
    
      <div class="x-logobar">
        <div class="x-logobar-inner">
          <div class="x-container max width">
            <?php x_get_view( 'global', '_brand' ); ?>
          </div>
        </div>
      </div>
    
      <div class="x-navbar-wrap">
        <div class="<?php x_navbar_class(); ?>">
          <div class="x-navbar-inner">
            <div class="x-container max width">
              <?php x_get_view( 'global', '_nav', 'primary' ); ?>
            </div>
          </div>
        </div>
        <!-- Your HTML will go here -->
      </div>
    
    <?php else : ?>
    
      <div class="x-navbar-wrap">
        <div class="<?php x_navbar_class(); ?>">
          <div class="x-navbar-inner">
            <div class="x-container max width">
              <?php x_get_view( 'global', '_brand' ); ?>
              <?php x_get_view( 'global', '_nav', 'primary' ); ?>
            </div>
          </div>
        </div>
      </div>
    
    <?php endif; ?>

    After that replace <!-- Your HTML will go here --> with your HTML code.

    Hope it helps 🙂

    #1209973
    awecesar
    Participant
    This reply has been marked as private.
    #1210099
    Thai
    Moderator

    Hey,

    I’ve just updated the code a bit.

    Please take a look.

    Cheers!

    #1211482
    awecesar
    Participant

    could you tell me what you have changed?

    #1211594
    Joao
    Moderator

    Hi There,

    Navigate to your child theme’s /framework/views/global director, find the file named _navbar.php and check it.

    Hope it helps

    Joao

  • <script> jQuery(function($){ $("#no-reply-1209052 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>