-
AuthorPosts
-
May 6, 2014 at 4:21 pm #41258
Hi great theme and support,
I was wondering if i can add an search field next to my logo above the navbar. If this is not
possible maybe i can place it in the topbar content (with shortcode or css) please advise me how to do this. I am using the integrity light theme.Thanks Ronald
May 7, 2014 at 10:13 am #41548Hi There,
there are already a lot of threads about this question so I would recommend using the search options to find out more about this. Here are some of the threads that might be helpful for you:
http://theme.co/x/member/forums/topic/add-search-bar-to-header/
http://theme.co/x/member/forums/topic/adding-a-search-field-in-the-navigation-menu/
http://theme.co/x/member/forums/topic/how-to-add-search-in-menu-bar/May 17, 2014 at 10:06 am #45410My First Post this was an issue I needed solved and messing about with core files I hate doing so I plugged this in where appropriate adding a search box to the “topbar” above the logo is pretty easy
Open Customizer
Scroll to “Header”
Scroll to widget bar I selected none because I wanted to add my own code to the top bar field if you want the widgets area to be active for social icons or other widgets make the choice necessaryNext….
scroll to Miscellaneous in the header section of customizer
check the box to enable top bar
the editor text field appears and in that box place this code<div id="search-2" class="widget widget_search" style="width:300px; margin-top:6px; margin-bottom:-20px;"> <form method="get" id="searchform" class="form-search" action="http://www.texasroofandfence.com/newSite/"> <label for="s" class="visually-hidden">Search</label> <input type="text" id="s" class="search-query" name="s" placeholder="Search" /> <input type="submit" id="searchsubmit" class="hidden" name="submit" value="Search" /> </form></div>
As you can see Ive added an inline style to help position the search box modify this to your hearts content it naturally floats left so add float right if you want it on the right side.
and as for the support link the other topics pertain to adding search to the nav bar or logo bar or menu bar not top bar so I hope this helps the community
Top Bar customization needs serious attention but still this IS the best word press theme out there
May 18, 2014 at 3:21 pm #45730Thank you Steven, good one! 🙂
May 20, 2014 at 3:47 pm #46568Hi Steven,
Thanks for the help, i place your code and a search field does appear the only problem is i cant search anything. When you type something it doesnt search, do i need to change something in the code. i see a name of an website in the code should i change that to my website.
Any help is appreciated.Kind regards
RonaldMay 21, 2014 at 8:18 am #46830Hi Ronald,
Yes please try adding your site’s URL on that value.
Thanks!
June 17, 2014 at 7:23 am #57270I tried adding the code supplied by Steven R but unfortunately it doesn’t work. I replaced the address with my own site but when I try to use the search box it takes me to a page saying that the page I was looking for is no longer here and it has this in the web address bar at the top of the browser:
http://veganfitness.co.uk/veganfitness.co.uk/?s=walnut&submit=Search
Should it have my domain name twice?
Thanks!
DarrenJune 18, 2014 at 8:30 am #57806Hey Darren,
Please make sure you code looks like the following:
<div id="search-2" class="widget widget_search" style="width:300px; margin-top:6px; margin-bottom:-20px;"> <form method="get" id="searchform" class="form-search" action="http://veganfitness.co.uk/"> <label for="s" class="visually-hidden">Search</label> <input type="text" id="s" class="search-query" name="s" placeholder="Search" /> <input type="submit" id="searchsubmit" class="hidden" name="submit" value="Search" /> </form></div>
Cheers.
June 20, 2014 at 7:13 am #58788Thanks Support! I just had to change the top margin to 1px and the bottom margin to 50px to get it to look right. On paper that sounds like it will make it look strange but for some reason it displays correctly on chrome and firefox!
June 21, 2014 at 5:04 pm #59284Great to hear that Darren! You’re welcome 🙂
September 18, 2014 at 7:02 am #107146Is it possible to make the width of the searchbox (positioned in this way) 3 columns of the bootstrap grid? Do I just add the bootsrap classes?
September 18, 2014 at 7:16 am #107151Hi there,
You can increase or decrease the width of search box in code above by changing width value in first line.
Thank you.
January 28, 2016 at 3:27 pm #769396Hello,
I have added the following code:
<div id=”search-2″ class=”widget widget_search” style=”float:right” style=”width:300px; margin-top:10px; margin-bottom:-20px;”>
<form method=”get” id=”searchform” class=”form-search” action=”http://pathfinders.flywheelsites.com/”>
<label for=”s” class=”visually-hidden”>Search</label>
<input type=”text” id=”s” class=”search-query” name=”s” placeholder=”Search” />
<input type=”submit” id=”searchsubmit” class=”hidden” name=”submit” value=”Search” />
</form></div>But cannot seem to get the search bar to come down from the browser. I tried adding margin-top and padding-top but didn’t get any results.
Can you help?
January 28, 2016 at 3:28 pm #769397This reply has been marked as private.January 28, 2016 at 10:52 pm #769938Hi There,
You could try adding this in your customizer’s custom CSS:
#search-2 .widget_search{ margin-top:5px; }
Let us know how it goes.
Thanks.
-
AuthorPosts