How to Position Custom Menu
-
Hi,
I want to add custom menu to my primary menu, I have used this below code for this,
add_filter( ‘wp_nav_menu_items’, ‘search_menu_item’, 10, 2 );
function search_menu_item ( $items, $args ) {
if ($args->theme_location == ‘secondary-menu’) {
$items .= ‘<li class=”border-none”>SEARCH<form><input type=”text” name=”s” placeholder=”Search Here” class=”search-box”></form>’;
}
return $items;
}and menu is appearing at last, but I want to add my menu to 3rd position. How do I do this
Can anyone Help??
Thanks
TZone
- The topic ‘How to Position Custom Menu’ is closed to new replies.