Forums › Forums › Search & Filter Pro › Change "Start meta key" and "Value postfix" dynamically
Tagged: acf, Dynamic, start meta key
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by Trevor.
-
Anonymous(Private) November 5, 2019 at 2:15 pm #225832
Hello, Search and Filter Pro team!
First of all, I want to congratulate you on this wonderful plugin! I have tested multiple filter/search plugins and this is the only one that was really able to work with Elementor Pro properly.
I’ve created my custom search bar with a few CSS tweaks and it looks fantastic!
A quick background:
One of my “post meta” range slider fields is called “length” and the value is in meters. It works perfectly as it is right now. It uses an ACF custom field called “length_meters”.
My question is as follows:
Do you have a hook/filter I can use to dynamically change that same range field to use another ACF field called “length_feet” and change the value postfix to “ft”?
Reasoning:
People want to view posts in meters or feet. It would be ideal if I could keep the same range field and simply switch out the source ACF field when a button/link is clicked.
Thank you! I really appreciate it!
Armando J. Perez CarrenoAnonymous(Private) November 5, 2019 at 3:43 pm #225854Wow! Thank you for your fast response, Trevor!
What do you think would be more efficient:
1. I can duplicate the form to have one form for feet and one for meters. Then, I can conditionally render the appropriate form in PHP if the cookie is set for meters or feet.
or
2. I can have both meters and feet range field in the same form and dynamically hide one or the other using JS when the cookie is set for meters or feet.
I really appreciate your time,
Armando J. -
AuthorPosts