Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #891930
    Vladmazurenko
    Participant

    Hello,

    I am following this topic in order to accomplish different menu for the shop page.

    I have already made the steps:

    1. Set up a child theme http://theme.co/x/member/kb/how-to-setup-child-themes/
    2. Create file _navbar.php in {X-CHILD-STACK}\framework\views\global\

    then I can not find any php code as mentioned below in the directory /x/framework/views/global/_nav-primary.php

    1. Duplicate that file and name it _nav-primary-shop.php

    2. From _nav-primary-shop.php replace this code /*CODE*/ <- I can not find it in my php file!

    #892943
    Lely
    Moderator

    Hi There,

    To achieve different menu in the shop page, please add the following code instead in functions.php file on your child theme:

    add_filter( 'wp_nav_menu_args', 'custom_blog_menu' );
    
    function custom_blog_menu( $args ) {
      if ( x_is_shop() ) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'Shop';
      }
      return $args;
    }
    

    Then on Appearance > Menu: create a menu name Shop. Or you may change this to your preferred name.

    Hope this helps.

    #893296
    Vladmazurenko
    Participant

    It worked,

    But it only works for trimey/tienda (product list)
    I also need it the same shop menu for the rest pages:

    http://trimey.com/carrito (cart)
    http://trimey.com/caja (checkout)
    http://trimey.com/mi-cuenta (my account)

    And single product page.

    #894002
    Jade
    Moderator

    Please try to update the code to

    add_filter( 'wp_nav_menu_args', 'custom_blog_menu' );
    
    function custom_blog_menu( $args ) {
    
        if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) {
            $args['theme_location'] = 'primary';
            $args['menu'] = 'Shop';
          }
      
        return $args;
    }

    Hope this helps.

    #894947
    Vladmazurenko
    Participant

    Hello,

    It does not work at all. The main menu and the shop menu are not visible.

    trimey.com

    #894951
    Vladmazurenko
    Participant

    Can I @Lely try to help me?

    #896050
    Rad
    Moderator

    Hi there,

    In that case, 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.

    Thanks!

    #896474
    Vladmazurenko
    Participant
    This reply has been marked as private.
    #896476
    Vladmazurenko
    Participant
    This reply has been marked as private.
    #897262
    Christopher
    Moderator

    Hi there,

    Please update your function to :

    add_filter( 'wp_nav_menu_args', 'custom_blog_menu' );
    
    function custom_blog_menu( $args ) {
    
        if ( x_is_shop() || is_cart() || is_checkout() || is_account_page() || x_is_product() ) {
            $args['theme_location'] = 'primary';
            $args['menu'] = 'Shop';
          }
      
        return $args;
    }

    Hope it helps.

    #897326
    Vladmazurenko
    Participant

    Hello,

    please review my website http://www.trimey.com

    My website menus doesn’t work anymore even if I delete the function.php
    I don’t know what happened.

    #898086
    Christopher
    Moderator

    Hi there,

    Please provide us with FTP credentials so we can take a closer look.
    Please add following code in Customize -> Custom -> CSS :

    body.x-navbar-fixed-top-active .x-navbar-wrap {
        height: auto;
    }

    Thanks.

    #898145
    Vladmazurenko
    Participant

    Hey,

    I don’t know what is recently happening with the forum replies quality. You asked me for ftp credentials which where provided 2 days ago in this topic. I am struggling 6 days with this problem and 4 people couldn’t help me.

    Vlad.

    #898520
    Paul R
    Moderator

    Hi Vlad,

    I was able to fix your menu.

    Kindly check on your end.

    Thanks

    #898809
    Vladmazurenko
    Participant

    Thank you SO MUCH Paul.

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