Add span in top menu item with nested itens

You can use the walker_nav_menu_start_el filter: add_filter( ‘walker_nav_menu_start_el’, ‘wpse_add_arrow’,10,4); function wpse_add_arrow( $item_output, $item, $depth, $args ){ //Only add class to ‘top level’ items on the ‘primary’ menu. if(‘primary’ == $args->theme_location && $depth ==0){ $item_output .='<span class=”arrow”></span>’; } return $item_output; } This assumes that you’re using wp_nav_menu( array( ‘theme_location’ => ‘primary’) ); to display the menu. … Read more

Creating Featured Content Boxes

What you are describing can be accomplished with Featured Image and a simple wp_query call. These are very core elements of a WordPress theme. You’d need to define a size with add image size, and then call it up using the aforementioned post_thumbnail. Your loop might look something like this: $args = array( ‘post_type’ => … Read more

How to remove dropdown from wp_nav_menu

We can use depth parameter of wp_nav_menu to set how many levels menu walker traverses. wp_nav_menu( array( ‘menu_id’=>’nav’, ‘theme_location’=>’header-menu’ , ‘depth’ => 1) ); You can create a child theme so that updates won’t override during updates. Create child theme and copy code from header.php of parent theme then replace the code wp_nav_menu( array( ‘menu_id’=>’nav’, … Read more

Get menus created with menu editor?

Maybe this helps : function get_all_wordpress_menus(){ return get_terms( ‘nav_menu’, array( ‘hide_empty’ => true ) ); } get_registered_nav_menus only gets the theme’s menu’s and not the clients menu’s. Source : Paulund This returns all ID’s. To get the name you can use : <?php $nav_menu = wp_get_nav_menu_object(ID comes here); echo $nav_menu->name; ?> All menu objects have … Read more

How to get rid of the home link in nav menu?

it shows the home link cause you don’t have anything set yet… go to your functions.php and add this code add_theme_support( ‘menus’ ); if ( function_exists( ‘register_nav_menus’ ) ) { register_nav_menus( array( ‘header_menu’ => ‘Header Menu’ ) ); } endif; Go to Apparence and then get into Menu option… Create a menu set the pages/links/categories … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)