Articles of menus

How to display all navigation menus as dropdown in widget?

Im wondering how to display all my previusly added menus(navigation menus) as dropdown (like categories dropdown) in widget. In widget are it’s call “Custom Menus” width desc: “Add a custom menu to your sidebar”. I know how to display categoreis as dropdown in widget, it’s like this: <p> <label for=”<?php echo $this->get_field_id( ‘category’ ); ?>”><?php […]

How to set visibility on menu Item usin WP Nav Menu Roles and wp_update_nav_menu_item()

Is there a way to set the item visibility when programmatically creating items with wp_update_nav_menu_item() ? This is my code wp_update_nav_menu_item($menu_id, 0, array( ‘menu-item-title’ => __(‘Title’,’_mytheme’), ‘menu-item-object’ => ‘page’, ‘menu-item-object-id’ => get_page_by_path(‘title’)->ID, ‘menu-item-classes’ => ‘custom-class’, ‘menu-item-type’ => ‘post_type’, ‘menu-item-status’ => ‘publish’)); WP Nav Menu Roles use this function nav_menu_roles_item_visibility(), is it possible to set the […]

Prevent divi slide-in menu to collapse by current menu-item

has anybody a solution to prevent the divi slide-in menu (a theme by elegantthemes.com) to prevent to collapse? When a submenu-item is chosen, the menu should not collapse, so the users can visit other sub-menus on this level without clicking from the first level to the current one. Thanks so much, Florian

Is it possible to display a list of related pages on a sidebar?

Let’s say I have a menu item named “About” and that menu item is parent to 2 sub-menu items “Who we are”, “Our Mission”, for example. The parent item “About” does not lead anywhere but when on any of the child pages I wish to have a list of all the child pages of “About”, […]

Make two bootstrap menus collapse into one dropdown

I have created a navigation bar with Bootstrap on WordPress that has two separate menus that I want to collapse into one menu. I have these menus separated because I wanted a logo centered between them. The menus work, but when they collapse, my drop down isn’t clickable. Here is my code: <section id=”navbar”> <div […]

How to hide the menu item created by the theme in WordPress admin panel?

I installed the flatsome theme and it created a menu in the admin panel. I wanted to hide it because it is redundant to Appearance menu that is already in the dashboard. How will I possibly hide the menu item on the sidebar and on the top bar? Here is an screenshot.

Navigation not working for custom post type pages

I have been facing this peculiar problem. I am fairly new at WordPress development and I have been trying to set up a maid listing site and few other services too. For this I had created three custom post types for them. However when I put custom slug in the navigation menu, the button seems […]

One pager menu not working on detail page

We are building a one pager website with a detail page to the protfolio items. Now we have the menu scrolling on the homepage to the content on that page. So i’m having the menu items ike this. <ul> <li><a href=”section-1″>Section 1</a></li> <li><a href=”section-2″>Section 2</a></li> <li><a href=”section-3″>Section 3</a></li> <li><a href=”section-4″>Section 4</a></li> </ul> The content divs […]

PHP drop down menu for my get_category child of

I have this code here and I can’t figure out how to get it within a drop down menu. <H3>Availabilities</H3> <?php $taxonomy = ‘category’; // Get the term IDs assigned to post. $post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( ‘fields’ => ‘ids’ ) ); // Separator between links. $separator = ‘, ‘; if ( ! empty( […]

User WordPress menu in custom page

I have a third party app installed (such as a forum) that I’ve linked with my WordPress menu (as a custom link). However I wish to show the same wordpress menu above this app (I have it’s source code so can make changes). What do I need to do so it shows up nicely on […]