Reply To: Override search results page


Thank you for clarifying how the filters work.
I’ve been trying several things, as I’d ideally like to have the filter selectors be: Articles (New CPT), Resources (New CPT), Consultants (New CPT), Feeds (Feed Type CPT), Products (Product CPT), Jobs (Category of Feed CPT)
Note: Currently Articles and Resources only have 1 in each as over the next few weeks/months I’ll be moving all old posts into custom post types so I can organize better with taxonomies. Also, I have not created the Consultants post type yet.
Right now however, I’m unable to get search results for either of the article or resource CPT (“The Advantages of Hiring Team Members with Non-IT Backgrounds” and “Free Project Management Courses” respectively)
Note: If you try to search for them, both of these have admin as the author, as they are copies of posts and I have not removed the original posts categorized as article or free project resource due to the testing I’m doing with CPTs as mentioned).
In trying to figure out how to get the selectors I want, I tried to remove the post and page filters to allow users to filter by category and post type, however if for example I’d only like to search for products, I noticed that pages and posts still showed up. I’d like to be able to select a checkbox and for only those things to show up. Similarly, the other issue here is because Jobs is a category of Feeds, the user must select both feeds and Jobs. I’d like for them to just select Jobs and for those items to show up. (I also don’t like how Jobs has to be displayed separately from the others in the selectors view.) I think the categories of selectors should use an OR rather than an AND operator that way the user can select a category, but not have to select a post type.

Also, I was trying to see the difference between using the regular engine and the index engine, and then it didn’t seem like my feed items were coming up in search. (The general feed pages came up, but not the individual feed posts) I was also afraid that even with the index extending itself on publish that the feed items wouldn’t be a part of that since they are not stored as posts or pages, and instead they are stored within the WP RSS Aggregator plugin. Because I was unsure of this and didn’t like the way the individual feed items were not showing in the results, I reverted back to the regular engine and removed the index table. However, now I am not getting any RSS feed items (other than Jobs) or custom post types (Resources, or Articles as mentioned above) in my search results. I looked through all of my settings and can’t figure out why neither the feed items or the articles and resource post types will come up for any of my searches – I went to my feed pages and searched for various items that are currently listed and got no results.

Another thing is, I can’t seem to determine if displaying by category or by post type is better. Similar to above, I’d like the preview results to display grouped as Pages, Articles, Resources, Feeds, Products, and Jobs. And I’ve noticed that other than Jobs, I’m unable to search for any feed items, or the CPTs of articles and resources as mentioned above. I realize it’s a bit confusing right now because the CPTs were being tested in this development environment, but I want to make sure I have the search fully configured before I move it into my production environment.

Thank you for the Highlighting info, it worked!

As far as the pages not showing any content in the preview, I tried adding an excerpt to one of my dynamic pages and it displayed in the main search results, but not in the preview results. Not sure if there’s any way to fix this. I know I have it set to search the excerpts.

Also, thank you for the information about distinguishing the different post types, it was a huge help! I did a bit more research on the rss aggregator plugin and it turns out that plugin does not allow feeds to show up in search results, so it seems as if because I allowed the feed post type to come up in results, something with this search plugin is stripping the html tags and displaying all information in a single paragraph tag. For example, it shows the source, date, and main content all lumped together–we would ideally like to have that information separated, so I’m wondering if there is a way maybe in the code to determine for that post type not to strip the html and differentiate between the sections.

Thank you again for all of your help!