Jump to content


Photo
- - - - -

Search results to include all post types and sections

search sections search results post types

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 etstech

etstech

    Newbie

  • Members
  • 2 posts

Posted 25 September 2012 - 02:24 PM

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?

#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 25 September 2012 - 02:32 PM

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.

#3 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts

Posted 25 September 2012 - 03:40 PM

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

Please Login or Register to see this Hidden Content



#4 etstech

etstech

    Newbie

  • Members
  • 2 posts

Posted 25 September 2012 - 05:00 PM

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

#5 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts

Posted 25 September 2012 - 05:02 PM

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.

#6 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 01 November 2012 - 10:53 AM

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)

Please Login or Register to see this Hidden Content


Hope it helps.

#7 ellenmva

ellenmva

    Advocate

  • Members

  • 356 posts

Posted 01 November 2012 - 01:04 PM

I found a solutions with the

Please Login or Register to see this Hidden Content

. 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

Please Login or Register to see this Hidden Content

but it is free.

#8 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 01 November 2012 - 03:41 PM

@ellenmva Thanks for posting a solution.