Forums Forums Search & Filter Pro Range filter: Convert inch value to feet

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #199163

    I have an ACF field in a custom post type for length. I’d like to filter results on that value, but since I use inches to calculate feet and meters elsewhere on the site, I’d like to not have the user filter by inches. This would mean some sort of filter to change my range slider to display a calculated value for feet (inches divided by 12) in the input boxes while still actually doing the filter against the inches value in the database. Is this possible?

    Anonymous
    #199164

    I should mention, I looked at the documentation for Filter Input Object in the Search and Filter Pro docs. While it sounded like that would do what I wanted, I’m either failing to figure out how, or this doesn’t do what I thought it would.

    Trevor
    #199168

    You would need to convert the actual data in the database to whatever unit you need to use, as we cannot perform calculations on post meta data when filtering.

    Anonymous
    #199170

    Bummer. I was afraid you were going to say that. I guess I’ll have to get the client to change over dozens of posts to use feet instead of inches for length measurements. Thanks anyway.

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