Jump to content
etstech

Search results to include all post types and sections

Recommended Posts

etstech    0
etstech

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
catrina    103
catrina

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
etstech    0
etstech

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
Simon    247
Simon

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)    1
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)

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

Hope it helps.

Share this post


Link to post
Share on other sites
ellenmva    112
ellenmva

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

    • 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
      Cheers
    • yemoonyah
      By yemoonyah+
      Hi,
      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!
      http://yemoonyah.com/quiz
      (I'm on the latest WP & PL version)
      Thanks.
       
    • 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');  
    • Queue-it
      By Queue-it+
      HI,
      Search function doesn't seem to work. 
      When ever searching for something it redirect to the home page and add the search string to the url.
      For example searching for "cases" it would display https://queue-it.com/?s=cases
      Do you know how to solve that? 
×