-
AuthorSearch Results
-
October 22, 2015 at 11:28 am #27945
In reply to: Default search
RossKeymasterHey Keith
Unfortunately this is not yet an option within S&F – but there are a couple of hacky workarounds.
1) Enable “Bookmarkable URLs” – then go to you search form, click “most popular” and you will notice the URL change. Use this URL for linking to your search page.
2) Use the filter
sf_edit_query_args
(this is a lot more complex) – http://www.designsandcode.com/documentation/search-filter-pro/2-0-upgrade-notes/#No_more_pre_get_postsThen you would have to detect whether a search has been performed (ie any options in the form selected) – if not you would use the above filter to by tag 1 – and then using JS you would also have to set the filter – its pretty messy but I guess possible.
Thanks
October 7, 2015 at 8:57 am #26679In reply to: Add existing parameters of query to shortcode
AnonymousInactiveSorry, I can’t go by this way, because I can’t pass category or tag into
sf_edit_query_args
🙁Category isn’t fixed, it get from post with vitrine shortcode. So different vitrines have different categories, but shortcodes in the posts can be same!
October 6, 2015 at 6:47 pm #26651In reply to: Add existing parameters of query to shortcode
RossKeymasterHey Sergey
I think we’re getting confused.
So, what you would like to do (as an example) is pass the category through to S&F, in the shortcode or something similar.
Well, this is not yet possible, but you can use the shortcode like you mention above, and then use the filter
sf_edit_query_args
in the link above to limit the tag/category to whatever you like.So in this way it is dynamic and according the cat/tag you supply via some custom php code.
Does that make sense?
Thanks
October 1, 2015 at 5:11 pm #26335In reply to: changing filter results
RossKeymasterHmm what are you trying to do, find out what the current search is, and modify the query based on certain criteria?
What I think you might want to do is, check what the current user has searched for by using the info here:
http://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/
and then run
sf_edit_query_args
– if you want to checksf_edit_query_args
after it has some values from S&F then run it with a lower priority (eg 100):add_filter( 'sf_edit_query_args', 'sf_filter_query_args', 100, 2 );
Thanks
October 1, 2015 at 6:56 am #26291In reply to: changing filter results
AnonymousInactiveSo I’ve found that there is a new filter sf_edit_query_args which is exactly for this purpose. But when I try to hook there the $query_args argument is empty.. :-/
-
AuthorSearch Results