Forums › Forums › Search & Filter Pro › Some Ui questions
- This topic has 15 replies, 2 voices, and was last updated 7 years ago by Trevor.
-
Anonymous(Private) November 10, 2017 at 4:25 am #141086
ok, great help over skype Trevor – exactly what i was after and pretty much all sorted – thanks!
for anyone interested
1. use pre and print r instead of var dump to get the bits you need:
$sf_current_query = $searchandfilter->get(7050)->current_query(); echo '<pre>'; print_r($sf_current_query->get_array()); echo '</pre>';
2. I ended up with this in my page template to target the ACF meta name chosen in the S&F query – i also ended up trying to cope with the All values parts being sent if no specific options are selected (i hide all items selection in front end):
global $searchandfilter; $sf_current_query = $searchandfilter->get(7050)->current_query()->get_array(); if ($sf_current_query['_sfm_comfort']['active_terms'][0]['name'] == ""){ echo 'no preference for comfort'; } else { echo '$sf_current_query['_sfm_comfort']['active_terms'][0]['name'] . ' comfort'; }
Trevor(Private) November 10, 2017 at 8:02 am #141110Thanks for sharing Mike. great to see you are up and running. I will close this thread for now. I you feel the support you received justifies a review, please feel free to leave one (if you haven’t already):
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/reviews/#comment
-
AuthorPosts