Forums › Forums › Search & Filter Pro › Current Taxonomies checked
Tagged: Current Taxonomy
- This topic has 6 replies, 2 voices, and was last updated 10 years, 3 months ago by
Ross.
-
Ross Moderator(Private) June 22, 2015 at 11:20 am #19981
Hey Benoit
This is being added as a feature in v2.0 ๐
This is literally the only feature S&F pro doesn’t have that S&F free does!
Thanks
Anonymous(Private) June 22, 2015 at 11:54 am #19985hi,
OK …
strange to have more features in free version !! :pAnd is there a way, to force $_sft variable for the S&F plug in ?
may be in my archive, I set get or post variable in relation of the current tanonomy in my archive page ?
I know how to retrieve the currents taxonomyies but I don’t know how the plug in need to get this information …
something like:
if current tax
add_query_arg (term) = current taxAnd is there a date for the 2.0 version of S&F ?
regards
Ross Moderator(Private) June 22, 2015 at 12:21 pm #19988Yes it is! The free version has a kind of “happy” bug which allowed this – accidentally I might add.
The way S&F works to set these is in its own classes:
public/includes/class-search-filter-display-shortcode.phpIn there you have the function
set_defaults($sfid)This will parse arguments from the query, and create an array
$this->defaultswith the various values in which are then checked when creating the various fields.You could hack in to here and add your own defaults/settings.
Thanks
Anonymous(Private) July 6, 2015 at 2:37 am #20775Hey,
can you help me a little more ?
here is my code,if (get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy'))) : $term_post = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') ); echo $term_post->slug ; //var_dump($term_post ); echo $term_post->term_id; $temp[] = $term_post->term_id; $this->defaults[SF_TAX_PRE.$term_post->slug] = $temp; endif;I retrieve the taxonomy ($term_post->slug) and the term_id ($term_post->term_id), but I can’t set them as default ?
the error msut be in:
should be $this->defaults[SF_TAX_PRE.$term_post->slug] = $temp;tks for the help,
Anonymous(Private) July 6, 2015 at 3:40 am #20776if (get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy'))) : $term_post = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') ); $temp[] = $term_post->term_id; $this->defaults[SF_TAX_PRE.get_query_var('taxonomy')] = $temp; endif;ok that works ! ๐
-
AuthorPosts