-
Search Results
-
This strikes me as an easy fix but i’m just not finding the method –
I’m writing a filter results page title like so:
<h1 class="entry-title"><?php echo $sf_current_query->get_field_string("_sft_rugtype"); ?></h1>with _sft_rugtype (aka, Rug Type:) being the taxonomy we’re filtering by, this all works fine but the title gets printed as “Rug Type: [term name]” – we’re looking to exclude the taxonomy in the display so it only says the term name. My apologies if this is documented somewhere i’m struggling to find it.
My S&F is entirely filtering on ACF fields as post meta results.
I’d like to display the selected search terms, however there seems to be a difference in how to get these vs more standard fields like category.
For example:
global $searchandfilter; $sf_current_query = $searchandfilter->get(1526)->current_query(); echo $sf_current_query->get_field_string("_sft_category");gives the expected result, but changing the argument in the third line to be a custom field using the name that appears in the url bar(?_sfm_work_type=26-%2C-27&_sfm_industries=14-%2C-15) doesn’t give any results, even though the filter works fine.
global $searchandfilter; $sf_current_query = $searchandfilter->get(1526)->current_query(); echo $sf_current_query->get_field_string("_sfm_industries");Is there a change in method to get those fields?