Tagged: x
-
AuthorPosts
-
February 13, 2017 at 1:55 am #1368548
hnr2802Participantis 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;
}February 13, 2017 at 1:59 am #1368551
ChristopherModeratorHi there,
Yes, my mistake, it should be shop-menu.
You menu displays fine on related pages, see the attachment.Thanks.
February 13, 2017 at 2:02 am #1368555
hnr2802Participanton 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;
}February 13, 2017 at 2:13 am #1368569
ChristopherModeratorThe 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!
February 13, 2017 at 2:17 am #1368571
hnr2802ParticipantThanks 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.
February 13, 2017 at 2:34 am #1368591
ChristopherModeratorPlease add this code :
li#menu-item-181 a span { color: red; }Thanks.
February 13, 2017 at 2:37 am #1368598
hnr2802Participantbrilliant, awesome help Christopher. thanks your.
p/s how do i determine the “Register Here” is actually menu-item-181
February 13, 2017 at 2:52 am #1368609
ChristopherModeratorYou’re welcome.
Please use Chrome developer tools (F12) to inspect elements.
Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1365609 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
