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
-
Laura Camellini in reply to:
filter authors on results(Private) November 30, 2016 at 9:41 am #73052Ok, 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(Private) November 2, 2016 at 12:30 pm #68105yes sure, thank you again
Laura Camellini in reply to:
double result page for single form(Private) November 2, 2016 at 11:05 am #68075So this is possible in a simple wp_query template!
Thanks a lot!Laura Camellini in reply to:
double result page for single form(Private) November 2, 2016 at 9:29 am #67748On 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(Private) October 16, 2016 at 12:27 pm #64281This code may help you in this way, same author ad the plugin I’m using:
Laura Camellini in reply to:
store and reload search filters by user(Private) October 12, 2016 at 12:48 pm #63515Hi 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 needThanks for your time and efforts,
LauraCLaura Camellini in reply to:
store and reload search filters by user(Private) October 11, 2016 at 8:46 am #63210There’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,
LauraCLaura Camellini in reply to:
store and reload search filters by user(Private) October 10, 2016 at 7:24 pm #63099And.. please can you tell me when this feature will be available in the official package?
Thanks,
LauraCLaura Camellini in reply to:
store and reload search filters by user(Private) October 10, 2016 at 4:00 pm #63067Hi,
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)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?(Private) October 9, 2016 at 4:08 pm #62897I think it whould ne a very nice idea, these are at the moment my client’s needs.
Regards,
LauraC -
AuthorPosts