The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
Tom Thorley
Forum Replies Created
-
Tom Thorley in reply to:
ACF field not working on reload(Private) August 4, 2019 at 9:15 am #217981Essentially it looks like Search & Filter Pro kills javascript events on reload? my “onclick” buttons cease to work on the reloaded “results” content. This must be a bug surely?
Tom
Tom Thorley in reply to:
ACF field not working on reload(Private) August 4, 2019 at 2:52 am #217977Hi, thanks for the reply, I’m slightly apprehensive about renewing a license if it’s unlikely to function how I want it to.
Tom
Tom Thorley in reply to:
Number of results not showing on "Archive"(Private) May 15, 2017 at 1:34 pm #108826This works perfectly! Thanks so much!!
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 14, 2017 at 1:44 pm #108703GOT IT!!!
global $searchandfilter; $sf_current_query = $searchandfilter->get(504)->current_query()->get_array(); if (empty($sf_current_query)) { echo ('All Articles'); } else { echo $sf_current_query['_sft_category']['active_terms'][0]['name']; }
The above code worked like a charm, I also use the “Archive” setting as you suggested! Thanks so much for your help on this one!! Finally working properly!! 🙂
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 13, 2017 at 2:49 pm #108628Hi Trevor,
UPDATE! I’ve managed to half get it working!!!
It now works for all categories except the “All Categories” one, this seems to behave differently to the others and the code I have used doesn’t bring it in:
$sf_current_query = $searchandfilter->get(766)->current_query()->get_array(); echo $sf_current_query['_sft_category']['active_terms'][0]['name'];
I’ve left the printr statement in on the live site so you can get a picture of what is happening. I presume there may need to be an if statement added but I have yet to be able to pull in the “All categories” heading… I was however thinking of just hard coding a title in as it is only one title?? But i’m not sure how I would do it. I’m sure there is a “proper” fix to this though?
I hope you have a good weekend
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 12, 2017 at 4:25 pm #108535Okay, but the checkboxes are directly from the S&F Plugin shortcode so does it not use the same kind of query as a search?
If it can’t be resolved with PHP, would you suggest a work around? I really want to get this to work because I am basing my whole search/browse functionality on S&F
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 12, 2017 at 4:15 pm #108528I see, well it’s in use with a category radio button field, not a search form. Do you think this is why it is returning empty?
As you can see on this page under the “category +” button, this is what is being used. There is no search form currently.
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 12, 2017 at 4:10 pm #108518Yes this is what returned the empty array
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 12, 2017 at 3:57 pm #108508This returns what looks like an empty array?
Array ( ) 1
Tom Thorley in reply to:
How to show the currently selected title only(Private) May 12, 2017 at 2:06 pm #108464Hmm, it’s throwing the same error. In the original snippet there is “->get_field_string” do you think this has something to do with it?
-
AuthorPosts