Articles of menus

How to get submenu dropdown with images?

I need to add submenus with images as in below snapshot. Main menu has About,Deposits, Loans,…etc. and I need to add Kakulu Savings account, Apeksha Savings account …etc under the Deposits Menu as sub dropdown menus with images.Can anyone explain how to do that? It’s better if explain it with examples. -cheers-

functions.php adding item to end of menu. I want to change position

I found a function in my template that is adding a register button to the end of my menu. I’m wondering if there is any way to make this function add the register button to the beginning of my menu items? add_filter(‘wp_nav_menu_items’, ‘vertoh_wp_nav_menu_items’, 10, 2); function vertoh_wp_nav_menu_items($items, $args) { $widget_ef_registration = get_option(‘widget_ef_registration’); if ($args->theme_location == […]

How to add columns to wordpress menu editor

Wondering if someone can point me in the right direction. Currently, I’m trying to figure out how to add columns and headings to sub menus. Naturally I want to create a basic megamenu where I can add titles with links inside elements. With list below the items. I’ve done a quick mockup on codepen of […]

Menu on mobile version doesn't collapse after choosing menu item

I currently have a one page site. On the mobile version when the menu expands and i choose an item the menu stays open while the page moves to correct anchor but it is blocked by the menu. is there a code or snippet to insert to make the menu collapse after an item is […]

How to request container_class from wp_nav_menu

I’m currently trying to setup a custom nav walker that will use container_class from the menu as a prefix for the class names of the list items and children. $defaults = array( ‘menu’ => ”, ‘menu_class’ => ”, ‘menu_id’ => ”, ‘container’ => ‘nav’, ‘container_class’ => ‘nav-primary’, ‘container_id’ => ”, ‘before’ => ”, ‘after’ => […]

login logout menu changes in wordpress

I am new to wordpress ,i use login and logout in my site,i already create pages for login , logout and register ,i wants to create 2 menu in navigation bar . one for register and another one for login and logout , before login 2 menus(login and register ) should visible and after login […]

Unable to get menu pattern using a walker

I am trying, for about a week, to create menu in below pattern…. <ul class=”nav navbar-nav navbar-right”> <li></li> <li class=”drop”><a href=”#”>About<i class=”fa fa-caret-down fa-lg padding-left”></i></a> <ul class=”dropdown”> <li></li> <li></li> </ul> </li> <li class=”drop”><a href=”#”>My Experience<i class=”fa fa-caret-down fa-lg padding-left”></i></a> <ul class=”dropdown”> <li></li> </ul> Right now, my menu looks like this…. <ul id=”menu-main” class=”nav navbar-nav navbar-right”> […]

Menu not adding the right items

I created a menu that includes all the different product categories. Yet the menu displays: Blog Cart Account Shop etc.. It does not display the product categories, just those titles. I have no plugins except for WooCommerce. The code I used to add the menu is within the functions.php: function register_my_menus() { register_nav_menus( array( ‘header_navigation’ […]

Highlight parent menu item when child post

I’m using this snippet for marking the parent navigation active when on custom post type single page: add_action(‘nav_menu_css_class’, ‘add_current_nav_class’, 10, 2 ); function add_current_nav_class($classes, $item) { // Getting the current post details global $post; // Getting the post type of the current post $current_post_type = get_post_type_object(get_post_type($post->ID)); $current_post_type_slug = $current_post_type->rewrite[slug]; // Getting the URL of the […]

Show menu item only if user is logged In (not word press login)

I am working on a web app word press. I am new to word press So maybe you will feel that this question is silly, I tried everything but i don’t want to use any plugin. here is what I need to show the register/login menu item to non-logged-in users and profile/logout menu item to […]