Support Forums

Hey there, it looks like you've been redirected from designsandcode.com - as you can see we have a new home - read more

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Results only show posts from one custom post types

Viewing 8 posts - 1 through 8 (of 8 total)
  • Christoffer Landberg
    #136996

    Hello!

    We have changed so that Search and Filter should search for posts in two custom post types. But when I search it only finds results from one of the two custom post types. I have also tried to uncheck the option which enables Relevanssi but when I uncheck that option it shows no results at all.

    If you follow this url http://foxdesign-staging.pixeltokig.se/sokresultat/?_sf_s=hls you can see that it finds one result for the custom post type called “Produkter” but it shows zero results for the custom post type called “Referenser” even though it exists posts which contain the word “hls” as you can see with this url http://foxdesign-staging.pixeltokig.se/vara-referenser?_sf_s=hls.

    I was trying to disable the Relevanssi option but then it shows no results at all.

    We want to show results from both “Referenser” and “Produkter” on this page http://foxdesign-staging.pixeltokig.se/sokresultat/?_sf_s=hls and would like to make the posts with a title which contains the search word come on top of the results with Relevanssi which seem to work on the other pages when it only search for one custom post type.

    Thanks so much in advance!

    Kind regards, Christoffer

    Christoffer Landberg
    #136999
    This reply has been marked as private.
    Trevor Moderator
    #137068

    It is because you had a sort order based on a meta key (popularity) and not all posts have a value (and are excluded if they do not). I have set this back to default to show you this.

    Christoffer Landberg
    #137087

    I see!

    But that should not matter right because it is checked to go with the Relevanssi search setting instead of Search and Filter search setting?

    Thanks!

    Christoffer Landberg
    #137089

    Also, when I uncheck the checkbox for Relevanssi search setting then I still get no results here http://foxdesign-staging.pixeltokig.se/sokresultat/?_sf_s=hls.

    Thanks!

    Trevor Moderator
    #137104

    I will answer these last two posts in turn, if that is OK?

    Post #137087. When using a text search only, the results will still be pre-filtered and sorted according to the form settings, so it does matter.

    Post #137089. You will get no results because a standard text box search looks only in standard posts and pages, not CPT’s, I believe.

    Christoffer Landberg
    #137256

    Thanks for the great reply!

    > Post #137087. When using a text search only, the results will still be pre-filtered and sorted according to the form settings, so it does matter.

    I see! Thanks for the clarification!

    > Post #137089. You will get no results because a standard text box search looks only in standard posts and pages, not CPT’s, I believe.

    So Search and Filter text field search does not support custom post types? If we want to use a text field search with Search and Filter then we have to also install Relevanssi?

    Thanks!

    Trevor Moderator
    #137336

    S&F should search the CPTs. I do not understand why it is not. You can see it doing this in the Movies demo. All S&F Pro does is to tell the WordPress search to look in CPTs, and then hands the search off to WordPress to receive back an array of the post IDs that match. It the filters those based on rules you have set in the form settings.

    If it is finding nothing when not using Relevanssi, then something is not right. Either WordPress has been told to ignore the CPTs (you can exclude a CPT from searches when you set them up), or something in the form settings is causing it, or the cache needs rebuilding after you switch off support for Relevanssi.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.