Forums Forums Search & Filter Pro Current Taxonomies checked

Viewing 6 posts - 1 through 6 (of 6 total)
  • Ross Moderator
    #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
    #19985

    hi,

    OK …
    strange to have more features in free version !! :p

    And 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 tax

    And is there a date for the 2.0 version of S&F ?

    regards

    Ross Moderator
    #19988

    Yes 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.php

    In there you have the function set_defaults($sfid)

    This will parse arguments from the query, and create an array $this->defaults with 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
    #20775

    Hey,

    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
    #20776
    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') );
    	$temp[] = $term_post->term_id;
    	$this->defaults[SF_TAX_PRE.get_query_var('taxonomy')] = $temp;
    
    endif;	

    ok that works ! ๐Ÿ™‚

    Ross Moderator
    #20937

    ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)