Support Forums

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.

Laura Camellini

Forum Replies Created

Viewing 10 posts - 11 through 20 (of 20 total)
  • Laura Camellini in reply to:
    filter authors on results
    #73052

    Ok, I tryed the code you suggest in your documentation also, and doesn’t work:

    //hide posts from search results
    
    function filter_hide( $query_args, $sfid ) {
    
    	$meta = get_user_meta(get_current_user_id(), 'hide', true);
    	
    	//if search form ID = 2259, then hide authors' posts
    	
    	if($sfid==2259)
    	{
    		$args = array(
        			'author__not_in' => $meta,
    		);
    	}
    	
    	return $query_args;
    
    }
    add_action( 'pre_get_posts', 'filter_hide', 10, 2 );
    Laura Camellini in reply to:
    double result page for single form
    #68105

    yes sure, thank you again

    Laura Camellini in reply to:
    double result page for single form
    #68075

    So this is possible in a simple wp_query template!
    Thanks a lot!

    Laura Camellini in reply to:
    double result page for single form
    #67748

    On your documentation

    https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/

    you say this is possible querying the form from another page:

    <?php
    	//grab the active query from our search form
    	//replace <code>1526</code> with the ID of your search form
    	global $searchandfilter;
    	$sf_current_query = $searchandfilter->get(1526)->current_query();
    ?>

    Whould this display the filtered posts to a php template?

    Laura Camellini in reply to:
    store and reload search filters by user
    #64281

    This code may help you in this way, same author ad the plugin I’m using:

    https://github.com/tripflex/user-meta-display

    Laura Camellini in reply to:
    store and reload search filters by user
    #63515

    Hi Trevor,
    I found this option while creating a new search form for “job” post tipe:
    ———————————–
    Detect defaults from current page
    When a Search Form is used on any page other than the Search Results Page, S&F will try to detect the post type and associated taxonomies of the current page – and set defaults in the Search Form to match these.
    ———————————–
    Does this function detect the post-meta and taxonomies connected with the current user?
    This could help in achieving what I need

    Thanks for your time and efforts,
    LauraC

    Laura Camellini in reply to:
    store and reload search filters by user
    #63210

    There’s auto-populate field option in the fields creator dialog windows, I’ll have a try with that option let’s see if it works, if not I’ll need to get the metas for each field with a php script in the form template, I’ll let you know how it’s gone at the end with a code sample.
    regards,
    LauraC

    Laura Camellini in reply to:
    store and reload search filters by user
    #63099

    And.. please can you tell me when this feature will be available in the official package?

    Thanks,
    LauraC

    Laura Camellini in reply to:
    store and reload search filters by user
    #63067

    Hi,
    I know you’re right telling me about garlic.js and will have a look at their documentation.
    Anyway in this particular case, using wp-job-manager-field-editor plugin I see the fields value is stored in the users meta (see the screenshot below, modal dialog of creation of the resume’s fields)

    wordpress dashboard -field creation

    Maybe a simple import function from the user’s meta, passing the right key->values to the search and filter pro form id would automatically set the result’s shortcode hetml values in the way the user configured it in the first instance…

    can I get a search and filter field’s value from the user meta like this:

    <?php
      $all_meta_for_user = get_user_meta( 9 );
      print_r( $all_meta_for_user );
    ?>

    Or do I need to run a get_user_meta (key->value) for each search and filter’s form field?

    Laura Camellini in reply to:
    Global query – can I hook into it?
    #62897

    I think it whould ne a very nice idea, these are at the moment my client’s needs.
    Regards,
    LauraC

Viewing 10 posts - 11 through 20 (of 20 total)