Forums Forums Search & Filter Pro How to use Post Meta (Number Range)

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #269336

    Hello There,

    we are having an issue with using Post Meta (Number Range) in the search filter plugin: https://surreyplacestg.wpengine.com/resource-library-temp/

    Let’s assume 1st resource from that page: https://surreyplacestg.wpengine.com/developmental-disabilities-primary-care-program-ddpcp/. We want to assign an age range 5-10 years to this resource. How can we add that values to that resource. we are using “Custom Post Type UI” to create some custom taxonomies (topic, resource type, etc.). But not sure how we can create taxonomies to assign number range to the resource so that we can filter them out using that searchfilter plugin.

    We want to do something like this in short:

    1) resource 1 -> assign age range as 5-10
    2) resource 2 -> assign age range as 10-15

    Then, on the actual search page (https://surreyplacestg.wpengine.com/resource-library-temp/), if someone selects 5-10 from the range slider, then it should display only resource 1, and if someone select range as 5 to 10 years, then it should display both resources.

    Can you help us solve this issue?

    Regards.

    Trevor
    #269393

    You would need a custom field to do that. I tend to use a free plugin named Advanced Custom Fields. CPT UI only allows you to make taxonomies, which are not number based (they are used for text only).

    Anonymous
    #269778
    This reply has been marked as private.
    Anonymous
    #269782
    This reply has been marked as private.
    Trevor
    #269875

    If you want to set a maximum and minimum manually, you can do it in the form field settings by switching OFF the Auto Detect settings, for example, as I have done here:

    https://www.screencast.com/t/dCQTUheVI

    I cannot provide back end access to the demo, but our developer has made some files available. If you have the same theme (we used Twenty Seventeen), this post talks about our demo page:

    https://support.searchandfilter.com/forums/topic/numeric-pagination/#post-226394

    And has a link to the template used.

    Anonymous
    #269881
    This reply has been marked as private.
    Trevor
    #270000

    You are correct. In the form, if you wish to allow the user to be able to specify ONE age, OR min/max age values, and in the post you must have a min and max age set, and for these you will need to use two different fields defined for the post, one for min age and one for max age, and then use these in the form.

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