Articles of menus

Remove li from wp_nav_menu

How can I remove the li from wp_nav_menu? I know I can remove ul but is it also possible to remove the li? I would want to do this on just one menu not all the menus on my site.

How to show Home Page link in WordPress Menu and how to add an icon to this?

I tried with this code: function home_page_menu_args( $args ) { $args[‘show_home’] = true; return $args; } add_filter( ‘wp_page_menu_args’, ‘home_page_menu_args’ ); but gives me this error: Error 404 – Not Found I would like that when I click on “Home Page” menu appears the recent posts. And I would like to place an icon instead of […]

insert element inside wp menu list item

I am not sure if it is clear from the title what I want to achieve here so let me try to clarify this. I wanna make use of WordPress’s menu system and need to adjust it to my needs, which means that I need it to go from here: <ul> <li>item1</li> <li>item2</li> etc. </ul> […]

Category menu item and its last 10 posts as sub-menu

i have some posts categories as element of a main navigation menu, and i’d like to display the ten lasts posts of this category as sub menu. ex: Category1 Lastpost1 Lastpost2 The main menu is build in the admin panel, and i’m wondering if there is a hook or something to achieve that automatically. I […]

menu behavior is not as expected

I am trying to develop one of those nav menus that has one on top of the other like so: I am not sure if the issue is with the way I coded my header.php: <!– HEADER ========================================================================================== –> <header class=”site-header” role=”banner”> <!– NAVBAR ====================================================================================== –> <div class=”navbar navbar-default navbar-fixed-top” role=”navigation”> <div class=”container”> <div class=”navbar-header”> […]

Main menu – get rid of titles?

I’ve got a default main menu: wp_nav_menu(); But it gives a list of links in a form: (…) <a href=”link” title=”PageName”>PageName</a> (…) The very important question is, how to force WP to display it like: (…) <a href=”link”>PageName</a> (…) I don’t like the yellow boxes appearing every time I hover anything in menu. I know […]

Removing strip_tags not working on nav_menu_description

So I’m adding descriptions to my site’s main menus. Checked the box, added the text. Dropped in a custom walker in functions.php. Dropped in a wp_nav_menu call in header.php to call the custom walker. Added text to the descriptions. All good… but then I decided I wanted to add breaks via HTML… Dammit they’re being […]

Wp menu add page link as custom empty link

i’ve a problem with wp menu, in the admin panel when i try to add a new page link to menu it creates a custom empty link instead, everything was working fine until i installed qtransalte X, when i clicked savemenu every menu links were emptied and converted to custom links. Please help me

Style wp_page_menu() items

I’m new to developing a custom template in WordPress but I fail to see how I can style a menu item seperately. With posts I can loop through them and place them in custom html elements. With wp_page_menu() I can only output the whole list. How can I loop through each item and place them […]

How to add nofollow to wp_nav_menu

I need to add an option in my theme options panel to set a specific custom menu’s links all to nofollow. Does wp_nav_menu() allow this or does it require a custom walker to manually ad rel=”nofollow”?