Forums › Forums › Search & Filter Pro › Combine a keyword search with user’s choice of custom field values
Tagged: acf, checkboxes, custom field
- This topic has 21 replies, 2 voices, and was last updated 5 years, 1 month ago by
Trevor.
-
Trevor(Private) July 29, 2020 at 4:19 pm #254406
Using the Home page as the results page, without the
?sfid=4398
, is not possible, if you need to use the search.php template, no.Our demo page:
https://demo.searchandfilter.com/movies/
You will see is on the movies page. Movies is the custom Post Type, so the template in use for that page is the archives template for that post type, and not search.php.
If you have the blog on the home page, and you are searching
Posts
, then you can use the Post Type archives templates for posts for the results (that is what it will use).Anonymous(Private) July 29, 2020 at 4:35 pm #254413Hi Trevor – thanks for the demo (if you could ‘bottle’ this up – I might be able to pick it apart to understand better)
I’m using a custom page template (a page) on which is search form an a wp query to show some CPT posts
– and then I get my results by going to the search page to show the CPT posts that i searched for————————–
So what i will need to do is
Build my landing page on the relevant archive page (in this case … archive-nhs.php)
– your ‘https://demo.searchandfilter.com/movies/’But what/where is https://demo.searchandfilter.com/genre/action/?’
🙂
Trevor(Private) July 30, 2020 at 8:55 am #254521We have a Movies Custom Post Type (you can add with a plugin like CPT UI):
Attached to that we have:
Custom Taxonomies (you can add with a plugin like CPT UI):
Genre
Production CompanyCustom Fields (Post Meta) (you can add with a plugin like ACF):
Average Vote
Release DateGenerally, ‘Blog’ Posts are or should be used only for actual blog posts. Other types of posts should have their own custom post type. Category and Tag are shipped as standard with WordPress, but should only be used with blog posts. They are really just custom taxonomies labelled as Category and Tag. There are tools to enable the transfer of blog posts to custom post types (Post Type Switcher) and also to transfer taxonomy terms to other custom taxonomies (Taxonomy Switcher). This way, you can go back and fix any data organisation errors you might make.
-
AuthorPosts