Site logo

Archived topic

Replace default search

7 replies · Started by morriscountynj on December 11, 2014

Viewing posts 1–8 of 8

I love the search in nav bar that generatepress comes with, but I don't want to use wordpress's default search. I actually use a free search tool that's powered by bing made for governments (see https://search.usa.gov/search?affiliate=morriscountynjgovernment&query=test&x=0&y=0 for an example).

Is there any way that when someone does a search using the built in form, it instead takes them to the one we currently use?

since i don't want a woocommerce search, would i remove the woocommerce stuff and do something like:

if ( ! function_exists( 'generate_remove_default_navigation_search' ) ) :
add_action( 'after_setup_theme','generate_remove_default_navigation_search' );
function generate_remove_default_navigation_search()
{
remove_action( 'generate_inside_navigation','generate_navigation_search');
}
endif;

<form role="search" .......
</form>

i'm also not quite sure how to integrate that into the site...do i replace the default search.php with that? or do i remove search.php and searchform.php entirely, and stick this in the header?

never mind, i was able to figure it out. i added that to my custom functions.php file and edited the form action accordingly. thank you!

Awesome, glad you figured it out :)

Sorry to ask such a dumb question but how do you start a new topic? As you guessed, I'm a newbie here.
Pat

This archived topic is closed to new replies.