Archived

This topic is now archived and is closed to further replies.

  • 0

Search results to include all post types and sections


Question

Posted · Report post

I noticed that the Pagelines search only shows results for content published in a standard post or page. However, I am creating a site layout that heavily uses sections and other post types including Banners, Boxes, Highlights, Hero Units, and ContentBox. None of the content published in these are being found via the search. This is a HUGE problem!

The ideal result should be that if any given Page displays content from a Box, ContentBox, etc., that the Search should show this Page (not just the Box, etc) in the results.

Can anyone help out with a solution?

Share this post


Link to post
Share on other sites

7 answers to this question

Posted · Report post

Relevanssi plugin (a free version) replaces WP default search and can index custom fields (i.e. post_meta for contentbox ??? maybe, haven't tried it)

http://www.relevanssi.com/features/

Hope it helps.

Share this post


Link to post
Share on other sites

Posted · Report post

This issue has never been addressed before, but you make a good point. I don't know how the PageLines search is built into the theme, but I can find out if it would be possible to incorporate other sections into the search.

Share this post


Link to post
Share on other sites

Posted · Report post

I found a solutions with the Swiftype Plugin. It works like Google Custom Search where it crawls the site and builds the search results based on the whole page content resulting in searching the from content in sections and boxes. The search returns the page the section or box is on.

I have it on a staging site right now so I haven't gotten into customizing the search results through Swiftype. There are some nice features.

And, you do need to sign up for Swiftype but it is free.

Share this post


Link to post
Share on other sites

Posted · Report post

The framework does not modify the standard wordpress search functionality.

If you want to add custom post types to the main search query you will have to use a wordpress filter.

Here was the first google result http://new2wp.com/noob/wordpress-search-custom-post-types/

Share this post


Link to post
Share on other sites

Posted · Report post

@ellenmva Thanks for posting a solution.

Share this post


Link to post
Share on other sites

Posted · Report post

I appreciate your clarification and link. That might work for custom post types, but what about sections (e.g. ContentBox)?

Share this post


Link to post
Share on other sites

Posted · Report post

banners, features etc are all custom post types, but no the contentbox will not be searchable, the content in it is not an actual post.

Its actually stored in the post_meta table. I dont think there is anyway to adapt the wp search for that.

Share this post


Link to post
Share on other sites