-
AuthorPosts
-
February 25, 2015 at 12:14 pm #215117
You’re welcome! 🙂
December 28, 2015 at 10:09 pm #723902Added the above code to add the Search Bar in the Nav Bar, and the mobile menu is no longer working.
Here is the site.
http://www.baldeaglepictures.com/Thanks,
MattDecember 28, 2015 at 11:16 pm #723955Hello Matt,
Please update the following custom CSS:
@media (max-width: 979px){ .custom-search { display: block; width: 100%; margin-bottom: 10px !important; margin-top: 10px !important; } }
To this:
@media (max-width: 979px){ .custom-search { display: block; width: 100%; margin-bottom: 10px !important; margin-top: 10px !important; position: relative; z-index: -999; } }
Hope this helps.
December 29, 2015 at 2:25 pm #724663Perfect. Thanks !
December 29, 2015 at 8:00 pm #724919Glad we could help, Cheers!
January 19, 2016 at 10:07 am #753310hi, sorry to come onto this thread however i have near enough exactly the same question.
my issues are that when i implement the above changes it seems to take up the wrong space and looks awful.
I need it to be like the attached, any suggestions please
January 19, 2016 at 1:59 pm #753629Hi @isearchlocal,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
January 20, 2016 at 4:04 am #754578This reply has been marked as private.January 20, 2016 at 4:14 am #754586Hi there,
Please add the code so we can see the issue and provide you with tailored solution.
Thanks.
January 20, 2016 at 4:21 am #754593done, added to the nabar.php and also the below CSS added
.custom-search{
color: #0157A8 !important;
float: right !important;
font-size: 18px !important;
margin: 20px 5px 0 10px !important;
width:20%;
}January 20, 2016 at 4:55 am #754637Hi,
Please remove _navbar.php in your child theme then add the code below in your child theme’s functions.php file.
add_filter('wp_nav_menu_items','add_search_box_to_menu', 99999, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'primary' ){ $items .= '<li class="custom-search"> <form id="searchform" class="menu-item menu-search" action="'.bloginfo('home').'" method="get"> <label class="visually-hidden" for="s"></label> <input id="s" class="search-query" type="text" placeholder="Search" name="s"></input> <input id="searchsubmit" class="hidden" type="submit" value="Search" name="submit"></input> </form> </li>'; } return $items; }
Hope that helps.
January 20, 2016 at 5:06 am #754650hi, really sorry i cant seem to find that php anywhere.
I have a functions folder and when i enter that i see the attached..January 20, 2016 at 5:46 am #754694Hi,
Please delete wp-content/themes/x-child/framework/views/global/_navbar.php
Then add the code below in wp-content/themes/x-child/functions.php
add_filter('wp_nav_menu_items','add_search_box_to_menu', 99999, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'primary' ){ $items .= '<li class="custom-search"> <form id="searchform" class="menu-item menu-search" action="'.bloginfo('home').'" method="get"> <label class="visually-hidden" for="s"></label> <input id="s" class="search-query" type="text" placeholder="Search" name="s"></input> <input id="searchsubmit" class="hidden" type="submit" value="Search" name="submit"></input> </form> </li>'; } return $items; }
Thanks
January 20, 2016 at 6:17 am #754751ok, now the nav bar has completed dissapeared
January 20, 2016 at 6:57 am #754809Hi,
In that case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
-
AuthorPosts