Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1368548
    hnr2802
    Participant

    is the code correct? it should be shop-menu right?

    //Load different menu on shop page

    add_filter( ‘wp_nav_menu_args’, ‘custom_shop_menu’ );

    function custom_shop_menu( $args ) {

    if ( x_is_shop() || is_cart() || is_checkout() || is_account_page() || x_is_product() ) {
    $args[‘theme_location’] = ‘primary’;
    $args[‘menu’] = ‘shopr-menu’;
    }

    return $args;
    }

    #1368551
    Christopher
    Moderator

    Hi there,

    Yes, my mistake, it should be shop-menu.
    You menu displays fine on related pages, see the attachment.

    Thanks.

    #1368555
    hnr2802
    Participant

    on another note, i would like to change the one menu item that direct to the shop page to different color.
    according to the guide below i have to copy the css code. but it is not working.
    https://community.theme.co/forums/topic/change-color-of-text-for-one-menu-item/

    #menu-item-2 a{
    color: #ff2a13 !important;
    }

    #1368569
    Christopher
    Moderator

    The code should be :

    li#menu-item-157 a span {
        color: #ff2a13 !important;
    }

    If you have any additional questions at this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.

    Thanks!

    #1368571
    hnr2802
    Participant

    Thanks for the reply, will open up another separate thread if have further questions. but the code not working. The “Register Here” does not change the color to red.

    #1368591
    Christopher
    Moderator

    Please add this code :

    li#menu-item-181 a span {
        color: red;
    }

    Thanks.

    #1368598
    hnr2802
    Participant

    brilliant, awesome help Christopher. thanks your.

    p/s how do i determine the “Register Here” is actually menu-item-181

    #1368609
    Christopher
    Moderator

    You’re welcome.

    Please use Chrome developer tools (F12) to inspect elements.

    Hope it helps.

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