How to use wp_nav_menu to create custom dropdown menu?

Use wp_nav_menu() with proper parameters to add the dropdown-menu forAnimate class, to remove the wrapper and to add the role attribute: <ul class=”nav navbar-nav”> <li class=”active”><a href=”https://wordpress.stackexchange.com/questions/255497/index.html”>Home</a></li> <li><a href=”category.html”>Category Page</a></li> <li><a href=”article.html”>Article Page</a></li> <li class=”dropdown”> <a href=”#” class=”dropdown-toggle” data-toggle=”dropdown”> Category Type A <span class=”caret”></span></a> <?php wp_nav_menu(array( ‘menu’ => ‘my_menu_name’, // specify the menu name ‘menu_class’ … Read more

function query_posts disabling current_page_menu class

The issue is caused by the query_posts function, this function alters the global $wp_query which the menu walker uses to check and add classes like current_page_menu to menu items. A solution would be to write a new custom query and loop through that than using query_posts. $title_slug = strtolower(str_replace( ” “, “-” , the_title_attribute(‘echo=0’) ) … Read more

WordPress post filter menu

1- To get a list of authors, you can use: <?php wp_list_authors( ); ?> This will return a list of authors and a link to their accounts and posts. To customize it using your desired arguments, take a look at Codex 2- To retrieve the categories, use: <?php wp_list_categories(); ?> This function will return a … Read more

Need a menu on left sidebar of the page with below requirements [closed]

Use a tutorial made for wordpress linke this one -> http://mysitemyway.com/docs/Collapsible_sidebar_menus and use a jQuery for animation jQuery(document).ready(function(){ jQuery(‘.menu .dropdown a’).click(function(e){ e.preventDefault(); if (jQuery(this).parent().children(‘.sub-menu:first’).is(‘:visible’)) { jQuery(this).parent().children(‘.sub-menu:first’).hide(); } else { jQuery(this).parent().children(‘.sub-menu:first’).show(); } }); });

How to customize the built in menu in wordpress?

Try this plugin and this plugin will allow you to add a menu icon for menus. https://wordpress.org/plugins/menu-icons You can also use https://codex.wordpress.org/Function_Reference/register_nav_menu to create a custom menu and for displaying menu in your theme you can use https://developer.wordpress.org/reference/functions/wp_nav_menu/