Home › Forums › Support › Issue with custom menu item This topic has 3 replies, 2 voices, and was last updated 7 years, 6 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts September 20, 2016 at 10:47 am #228076 stardrive Hi Tom, Please, custom menu item is not displaying in your secondary menu above the main menu. I used this code: function your_custom_menu_item ( $items, $args ) { if (is_single() ) { $items .= '<li>Show whatever</li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'your_custom_menu_item', 10, 2 ); In this case, Show whatever is my custom menu item. Please, kindly assist Regards, Stardrive September 20, 2016 at 10:40 pm #228185 TomLead Developer Lead Developer Hi there, I think using a plugin would be better in this case: https://en-ca.wordpress.org/plugins/if-menu/ September 21, 2016 at 2:39 am #228237 stardrive Hi Tom, Thanks for your response. I replaced if (is_single() ) { with if(is_user_logged_in() && $args->theme_location == ‘secondary’) and the code worked. Sorry I should have informed you much earlier Thank you. September 21, 2016 at 9:54 am #228344 TomLead Developer Lead Developer No worries, glad you got it working 🙂 Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In