Jump to content

Search results to include all post types and sections

Recommended Posts


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

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.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post

Link to post
Share on other sites

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

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
TourKick (Clifford P)

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)


Hope it helps.

Share this post

Link to post
Share on other sites

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.

Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • cstudio
      By cstudio
      I need some help!  I am trying to add a Square booking script.  When I add it to a embed section it crashes the page editor and I am unable to save the page version.  I have tried using different browsers with the same result.
       I can add the script on the backend in the word press content area and get it to show and work, but it look terrible.  A page with in a page.  http://www.zoeanastacia.com/booking/.
      I need help getting the page editor to work properly or to make the wp content section to not look like an 90's iframe.
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
    • yemoonyah
      By yemoonyah+
      I tried to make a simple change on my opt-in page today by reordering two sections.
      Now they won't save and whatever I do, the same 2 section will be stuck to the top.
      This is a huge problem since it is my opt-in page!
      (I'm on the latest WP & PL version)
    • Anthony King
      By Anthony King+
      I have to say that I like the Layout and the Template based sections. Some of them are really impressive.
      One of the things that I would like to request though is the possibility of being able to dynamically rearrange the layout.
      An example of what I am talking about is take the Agency Section. It's current layout starts with the
      Splash Module then the Portfolio Module then the Service Module and so on and so forth.
      What would be great is if we were able to move these modules around. I.e have the Service Module first
      then maybe the Splash, and then the portfolio.
    • John Olsson
      By John Olsson+
      Hello, i'm working on a webshop, and got this code to really boost the search within WP. But when adding this code to functions.php the front end media library search flipped totally, and not working at all, any ideas what's the problem?
      function atom_search_where($where){ global $wpdb; if (is_search()) $where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')"; return $where; } function atom_search_join($join){ global $wpdb; if (is_search()) $join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id"; return $join; } function atom_search_groupby($groupby){ global $wpdb; // we need to group on post ID $groupby_id = "{$wpdb->posts}.ID"; if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby; // groupby was empty, use ours if(!strlen(trim($groupby))) return $groupby_id; // wasn't empty, append ours return $groupby.", ".$groupby_id; } add_filter('posts_where','atom_search_where'); add_filter('posts_join', 'atom_search_join'); add_filter('posts_groupby', 'atom_search_groupby');