custom search for a custom post type

Hi Guys,
I have a rather big problem. I have created a partners community Index on and have a custom post type "partners" for that with some custom taxonomies to categorize the partners.
I created a page template and got all the partners displayed there in the way i wanted. So far so good. I was also able to add an Index-Feature.
What has me stuck for over a week now is the search function, i wanted to integrate into the page.
I use Relevanssi to replace the standard WPsearch so i can also search for authors and stuff on the rest of the website and i have a search.php specified for this search.
Now i want the search on the partners-page to "stay there" and not display the searchresults using the search.php.
I have created a searchform with a hidden field to specify the post_type "partners", a text input for the searchphrase and three select inputs for the taxonomies.
The search for the taxonimies is working just fine, but as soon as i enter a searchphrase, i get no results (which i understand, since i have deselected "partners" in the Relevanssi settings, since i don't want them displayed in my overall search results) and the layout jumps to the search.php-layout.
I tried replacing the "s" variable of the input field with my own (suche), but i don't get how i can "tell" the search to use this to display only the partners with the "suche"-value in the title.
Please help me, I'm really stuck here...
You can see all this at:
http://dreirad-kommunikation.at/partners/
Cheers,
Max

  • Predrag Dubajic

    Hey Max,

    I'm afraid that I'm not familiar with Relevanssi plugin and how it works so I won't be able to help you out much here.

    I did install the plugin on my end and played around a bit but I don't see an option to keep the results in same page so it seems like this would require some custom development in order to show results via ajax or similar solution.

    Search input field seems completely ignored by the search but there's nothing in console when I inspect your site that could tell us what's going on.

    I would suggest starting with conflict test by disabling your other plugins and switching to default WP theme to see if anything there conflicts with Relevanssi.

    If that doesn't return any results it would be best getting in touch with the plugin developers and they should be able give you some debugging paths you can try out.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.