Archived topic
Search Results - Custom Post Types
3 replies · Started by Brett on September 12, 2018
We setup a custom post type called "Products" and associated each product with a category. Note: We are using ACF Pro fields for inputting almost all the data on the CPT.
The next step was to create a new template to query by "Product" posts by category and display them. When we go to search for a specific product, the results show the CPT individual post but not the reference to the page(s) that uses the query in the template.
We tried the "exclude_from_search" setting on the CPT registration, but all that did was eliminate the individual post from the results.
How can we get the pages (associated with the template) to show and not the individual posts to show in the search results?
Thank you!
Hi there,
I'm not sure I completely understand. You don't want the search to include the single products? Instead, you want the search to pick up the page that displays the products?
Yes, that is what I've been asked to make happen. Any ideas on how to make that happen?
Any chance you can link me to one of the pages you want to include in the results?