WordPress FactoryHub theme

I am able to add custom icons for the factoryhub theme for Our location, Opening Hours, and Email address by going to:
Appearance->Customize->Header and adding the attached code:


Is there a way I can add a search field to the header in this same way?
I tried <?php get_search_form(); ?> but it didn’t work.

Hi @kboroumand

If you check demo in HOMEPAGE EXAMPLE 1 has search in header. mean you can set those header topbar settings in header option in customizer/widget.

For Serch form using html then this code will work better with your theme design: https://prnt.sc/mhlys4

<div id=“search-3” class=“widget widget_search”>
<form role=“search” method=“get” class=“search-form” action="">
<label>
<span class=“screen-reader-text”>Search for:</span>
<input type=“search” class=“search-field” placeholder=“Search …” value="" name=“s” />
</label>
<input type=“submit” class=“search-submit” value=“Search” />
</form>
</div>

Thanks

1 Like

Thanks a lot for your reply.
When I put the above code into the Customizing->Header Extra Text Area it doesn’t work.
I was able to get a search field using these instructions:


But I am having a hard time getting the CSS right.
The article in the link above suggests this Sample CSS:
3
This works but doesn’t match the factoryhub theme.
Factoryhub comes with search widget for the topbar which looks great.
But I am having a hard time matching the same style.
Do you know how I can change the above CSS to match the factory hub theme?
Your help is much appreciated.

please try to use id=“search-3” and class=“widget widget_search”. Hope it will be fine with your theme style. id you can use as you like best if not work then try to use search-3

Thanks but that only works when I add it to the header.php file.

The best way to get the support is Contact your purchased Theme Author. Contact Author and let them know because Item Author are best expert about their Item functionality.

Thanks