Support Forums

The forums are closed and will be removed when we launch our new site.

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

Forums Forums Search & Filter Pro Searching based on multiple CPT

Viewing 10 posts - 1 through 10 (of 18 total)
  • Keith White
    #240992

    We are trying to setup Search & Filter Pro on a page that will allow users to filter car makes and models.

    We have a CPT where car makes (manufacturers) can be entered which basically just includes a title and a logo.

    We have a second CPT where the individual car models can be entered and using ACF that can associated to a specific car make.

    The page will be setup with the Search form in the left column which will consist of two groups of checkboxes, one for Makes and the other for Models.

    The search results layout will have the Makes listed with their individual Models nested inside.

    I’m having trouble in figuring out how to setup the search form and my custom results page. We’ve used Search & Filter Pro successfully on a blog page which has the ability to filter by Category and/or Car Make but that uses just one CPT (posts) with the standard Category field and a Post Meta field for the Car Make ACF field.

    I’m sure I’m leaving out plenty of details so please ask any questions you may have.

    Trevor Moderator
    #240997

    What Custom Post Types do you envisage?

    I might think of 3:

    Cars (for sale maybe?)
    Makes
    Models

    If you use the free Advanced Custom Fields plugin, you can add Custom Fields to the Cars CPT that are Relational Post Objects (linked to the other 2 CPTs). Thus giving you one CPT to search (cars) with fields for the Makes and Models.

    With those also being CPTs, you can have CPT archive and post pages for them also.

    Keith White
    #241000
    This reply has been marked as private.
    Trevor Moderator
    #241018
    This reply has been marked as private.
    Keith White
    #241129
    This reply has been marked as private.
    Trevor Moderator
    #241287
    This reply has been marked as private.
    Trevor Moderator
    #241297
    This reply has been marked as private.
    Keith White
    #241656
    This reply has been marked as private.
    Trevor Moderator
    #241736

    I think the issue is the results page is pulling data from Problem Vehicles so there’s no way to get it to order by Manufacturer.

    Ah, of course. It is ordering by the value in the list, and not the label. That, if you have the PHP skills, can be fixed. You would need to return the sort order settings in the Posts tab back to default, and instead see if you can use this filter:

    https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments

    To somehow set that sort order, but I am not sure how. If you want, I can ask our developer, Ross?

    Keith White
    #241798
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 18 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.