-
AuthorPosts
-
November 12th, 2014 at 20:22 #28190Yvonne
Hello!
I’m wondering where to find the topmenu? It’s not in the header.php…at least i don’t see it.
I found it in the css though and already managed to make the topbar smaller. I want to place language flags at the ed of the topmenu, so i need t know in which .php-file it is in.
Can anybody help?Thanks a lot!
November 16th, 2014 at 16:22 #28257KayCryout Creations mastermindHi,
The menus are created using WordPress hooks and functions and you can find that in /includes/theme-setup.php
Too add to that it you should use filters. Here’s and example of how to add a searchbar to it:
add_filter(‘wp_nav_menu_items’,’add_search_box_to_menu’, 10, 2);
function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'top' ) { $items = $items."<li class='menu-header-search'> <i class='search-icon'></i> <form action='".esc_url(home_url( '/' ))."' id='searchform' method='get'> <input type='text' name='s' id='s' placeholder='".__('Search','nirvana')."...'> <input type='submit' id='searchsubmit' value='' /> </form> </li>"; } return $items; }
No matter how you do it though, always remember to use child themes. http://www.cryoutcreations.eu/wordpress-themes/wordpress-tutorials/wordpress-child-themes
Good luck!
- This reply was modified 10 years ago by Kay.
Before posting consider reading our short theme debugging instructions.
Please read the FAQs: Mantra • Nirvana • Parabola • Tempera
Tutorials: custom menus • translating theme • installing theme • category page with intro • disabling comments Wordpress: child themes • categories/posts
Before making any modifications to your theme we strongly recommend using Child Themes. -
AuthorPosts
The topic ‘Where to find the topmenu?’ is closed to new replies.