Forums Forums Search & Filter Pro Filter on EDD Search Results

Viewing 10 posts - 21 through 30 (of 61 total)
  • Ross Moderator
    #41742
    This reply has been marked as private.
    Anonymous
    #41767
    This reply has been marked as private.
    Ross Moderator
    #41768

    Hi Adam

    S&F doesn’t search tag names, nor does the default WP search – try your “Flowers” test with the old search and you will see (you can search tag names by combining S&F with Relevanssi).

    RE the input box, thats the last step we missed!

    So, each of the search input fields, that you have changed to be renamed to _sf_s, also has a value attribute.

    <input type="text" placeholder="<?php _e( 'Search', 'squarecode' ); ?>" value="<?php echo $searchresults; ?>" name="_sf_s" id="s" />

    we need to get the S&F search term into this value attribute. I can see in both your header and search templates, that the query is populated with the value from this line:

    <?php $searchresults = get_search_query(); ?>

    So all we need to do is get S&F search query into that variable – from the docs you would replace the code above with –

    <?php
    	//Get the search term
    	//replace <code>4243</code> with the ID of your search form
    	global $searchandfilter;
    	$sf_current_query = $searchandfilter->get(4243)->current_query();
    	$searchresults = $sf_current_query->get_search_term();
    ?>

    Thanks

    Anonymous
    #41773
    This reply has been marked as private.
    Ross Moderator
    #41805
    This reply has been marked as private.
    Anonymous
    #41808
    This reply has been marked as private.
    Ross Moderator
    #41810

    Ah yes – because its from the frontend some way, the WP filter save_post is not firing, which means S&F doesn’t know to update the cache for that post…

    To get around this, we have an action:

    http://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Update_Cache_for_a_Particular_Post

    do_action('search_filter_update_post_cache', 23);

    Just change the ID to reflect that of the post that has been just updated via the front end 🙂

    Thanks

    Anonymous
    #41814
    This reply has been marked as private.
    Ross Moderator
    #41818

    Ah yes, this is because when the S&F form is submitted, it doesn’t have a search field, so doesn’t submit any search string – you need to add a search field to your form, you can then hide it with CSS if you wish, but S&F is not designed to work simultaneously with other fields on a page – however with the changes we have been doing, we are allowing external search forms to redirect to S&F.

    Thanks

    Anonymous
    #41840
    This reply has been marked as private.
Viewing 10 posts - 21 through 30 (of 61 total)