Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1292367
    Friech
    Moderator

    Hi There,

    You mentioned above that this (<div class="weglot_here"></div>) was the code weglot Guys give you? Anyways let us know how it goes.

    Cheers!

    #1293845
    michaelgraynz
    Participant

    Have tried but no result
    Can you check that I have done it correct please?

    #1293854
    Rue Nel
    Moderator

    Hello There,

    Thanks for sending us the screenshot. Please ensure that you have placed the file in this location: wp-content/themes/x-child/framework/views/global or else it will not work. Based on the screenshot, you may only have placed it in wp-content/themes/x-child/ which is incorrect. Please double check it.

    Please let us know how it goes.

    #1293913
    michaelgraynz
    Participant

    OK but unfortunately those paths do not exist in my child theme
    ie there is no /framework/views/global paths

    #1293919
    michaelgraynz
    Participant

    do i just put it back in the x theme??

    #1293921
    Rue Nel
    Moderator

    Hello There,

    Basically those paths will not be on the child theme by default. If you want to override the parent theme, then that’s the time that you create the file and upload it to that location. Generally, you should follow these steps:
    1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
    2] Insert the following code into that new file

    <?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="weglot">
         ADD YOUR WEGLOT CODE HERE
      </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>
      </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; ?>

    And please do not forget to add the ADD YOUR WEGLOT CODE HERE with your weglot translator code.

    3] Save the file named as _navbar.php
    4] Upload this file to your server in the child theme’s folder
    wp-content/themes/x-child/framework/views/global

    Hope this helps. Kindly let us know.

    #1293948
    michaelgraynz
    Participant

    now i get the error in pic

    #1293949
    michaelgraynz
    Participant

    this time

    #1293971
    Paul R
    Moderator

    Hi,

    In that case, kinldy provide us your ftp login details in private reply.

    Thanks

    #1293977
    michaelgraynz
    Participant
    This reply has been marked as private.
    #1294000
    Paul R
    Moderator

    Hi,

    I was able to fix the error.

    Please note that you need to edit the file in /home/c35a3615463178/html/wp-content/themes/x-child/framework/views/global/_navbar.php
    and not the file /home/c35a3615463178/html/wp-content/themes/x-child/_navbar.php (I went ahead and deleted this file to avoid confusion)

    Thanks

    #1294003
    michaelgraynz
    Participant

    Oh thats great.
    Really appreciate the work.
    Can you explain to me how now I centre those flags?
    What code do I add or alter??

    #1294083
    Paul R
    Moderator

    Hi,

    You can add this under Custom > Edit Global CSS in the Customizer.

    
    .weglot {
        text-align:center;
    }
    
    .weglot ul {
       margin:20px auto;
    }
    
    .weglot li {
        list-style-type:none;
        display:inline-block;
        vertical-align:top;
        padding:0 5px;
    }
    

    Hope that helps.

    #1294928
    michaelgraynz
    Participant

    Thats absolutely stunning
    Thank you thank you. Thank you.

    Do you have any idea how I can remove the weglot flags from the menu bar

    #1295173
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating us in! To remove the flags in your menu, there has to be a setting somewhere that you can turn it off. Please go to Weglot > Language button position.

    Hope this helps.

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