Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1384007
    Azim Fakhri
    Participant

    Hi I tried so many times to uncheck the box. After saving, it will still be checked.

    I need it to uncheck as I need to use X default navigation on main page and Ubermenu on other pages.

    #1384022
    Rupok
    Member

    Hi there,

    Perhaps it was not saved properly. Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1384026
    Azim Fakhri
    Participant
    This reply has been marked as private.
    #1384058
    Azim Fakhri
    Participant

    I want to use manual integration for Ubermenu.

    #1384067
    Azim Fakhri
    Participant

    If you disable the Ubermenu plugin, X theme default menu is hidden because i hid it for a moment

    #1384085
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! To remove the integration of UberMenu in X, what you are trying to accomplish requires a template customization, we would like to suggest that you use 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.

    Once you have your child theme active and ready, please follow the following steps below:
    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/_NAV-PRIMARY.PHP
    // -----------------------------------------------------------------------------
    // Outputs the primary nav.
    // =============================================================================
    	
    ?>
     
    <a href="#" class="x-btn-navbar collapsed" data-toggle="collapse" data-target=".x-nav-wrap.mobile">
      <i class="x-icon-bars" data-x-icon=""></i>
      <span class="visually-hidden"><?php _e( 'Navigation', '__x__' ); ?></span>
    </a>
    
    <nav class="x-nav-wrap desktop" role="navigation">
      <?php x_output_primary_navigation(); ?>
    </nav>
    
    <div class="x-nav-wrap mobile collapse">
      <?php x_output_primary_navigation(); ?>
    </div>
    

    3] Save the file named as _nav-primary.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.

    #1384091
    Azim Fakhri
    Participant

    I will try to do as per your suggestion first.

    Thanks for your response!

    #1384214
    Paul R
    Moderator

    You’re welcome! 🙂

    #1386777
    Azim Fakhri
    Participant

    Hi I already tested with your suggestion.

    Thanks it helped me to remove the Ubermenu from the front page. However on other pages, the uber menu are shown as default menu. I want Ubermenu only appear on pages that uses its shortcode because i want to set which pages uses the uber menu. I know its different from what i originally asked here.

    Thanks

    #1386800
    Azim Fakhri
    Participant

    I found this on http://sevenspark.com/docs/ubermenu-3/theme-integration/x.

    If I add these lines before the code you gave me, can it help me achieve what i want?

    <?php if( function_exists( 'ubermenu' ) ): ?>
      <?php ubermenu( 'main' , array( 'theme_location' => 'primary' ) ); ?>
    <?php else: ?>
    #1386924
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! The code will replace the default X menu if ubermenu is active. If you want Ubermenu only appear on pages that uses its shortcode because i want to set which pages uses the uber menu. You can have something like this:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_NAV-PRIMARY.PHP
    // -----------------------------------------------------------------------------
    // Outputs the primary nav.
    // =============================================================================
    	
    if( function_exists( 'ubermenu' ) && $config_id = ubermenu_get_menu_instance_by_theme_location( 'primary' ) && is_page( array( 'about-us', 'contact', 'management' ) ) ):
    	ubermenu( $config_id, array( 'theme_location' => 'primary') ); 
     else: ?>
     
    <a href="#" class="x-btn-navbar collapsed" data-toggle="collapse" data-target=".x-nav-wrap.mobile">
      <i class="x-icon-bars" data-x-icon=""></i>
      <span class="visually-hidden"><?php _e( 'Navigation', '__x__' ); ?></span>
    </a>
    
    <nav class="x-nav-wrap desktop" role="navigation">
      <?php x_output_primary_navigation(); ?>
    </nav>
    
    <div class="x-nav-wrap mobile collapse">
      <?php x_output_primary_navigation(); ?>
    </div>
    
    <?php endif; ?>

    Please copy the raw code from here: (http://pastebin.com/bpnfKZYE)

    Just make sure that you replace the correct pages where you want to see the ubermenu in this statement:

    
    is_page( array( 'about-us', 'contact', 'management' ) )

    Hope this helps.

    #1386940
    Azim Fakhri
    Participant
    This reply has been marked as private.
    #1386944
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Have you edited the global nav primary file in your child theme? Please check the ftp access so that we can check the file or somehow, please post the contents of your nav-primary.php file in your next reply.

    Thank you in advance.

    #1386947
    Azim Fakhri
    Participant
    This reply has been marked as private.
    #1386975
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! I have resolve this issue for you. I added this code in your functions.php file

    add_filter( 'ubermenu_settings_defaults', 'custom_x_ubermenu_settings_default', 25, 1 );
    function custom_x_ubermenu_settings_default($defaults) {
    	$defaults['ubermenu_main']['auto_theme_location'] = array( 'custom' => 'custom' );;
    		return $defaults;
    }

    And I also change the condition in the _nav-primary.php file into this:

    
    if( function_exists( 'ubermenu' ) && is_page( array( 'demo-2', 'management' ) ) ):

    Please check your site now.

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