I did search and tried to create a child theme but the code I found seems to be specific to a particular theme and doesn’t seem to work on this one (Atomic).
The link I tried was at
https://wordpress.org/support/topic/add-search-box-to-nav-menu?replies=19
The link for the plugin says its 2 years old, no longer supported and may not be compatible with the latest version of WordPress.
This link works …….
http://www.wprecipes.com/how-to-automatically-add-a-search-field-to-your-navigation-menu
Now I just have to figure out how to use it in my child theme.
Thanks.
SusanRC,
A search box could be added, however this would require considerable effort to program it properly into the theme. For a quick solution, I would suggest looking for a plugin to accomplish this.
I did it. See link above.
I added a child theme and then added this code to the child’s function.php
add_filter('wp_nav_menu_items','add_search_box', 10, 2);
function add_search_box($items, $args) {
ob_start();
get_search_form();
$searchform = ob_get_contents();
ob_end_clean();
$items .= '
<li>' . $searchform . '</li>
';
return $items;
}
Also added this code to the child style.css
.main-navigation {
position: relative;
}
.header-search {
/* (remove float:right;margin-top:-40px;) */
display: block;
position: absolute;
top: 0;
right: 0;
}
And I had to declare this menu as the Primary menu.
Great. Glad to hear it’s working.