Forums Forums Search & Filter Pro Display selected filters

Viewing 10 posts - 1 through 10 (of 10 total)
  • Trevor
    #209306

    It would require custom coding when using the current version of Search & Filter Pro. You can access the filter terms though, but would need further PHP work to display them. To fetch the search terms, the https://searchandfilter.com/documentation/accessing-search-data/ guide is basic but you can extend the idea to grab lots of other data. If you have other filters, then it becomes a little more complex, but I can give you links. This thread might help you:

    https://support.searchandfilter.com/forums/topic/accessing-field-slug-on-search-results/

    … and this search will give similar threads I think:

    https://support.searchandfilter.com/forums/search/sf_current_query+get_array+field+%5Bvalue%5D/

    Note, if you are using Ajax refreshing of the results, any PHP needs to be inside the Ajax Container, or it will not update.

    Anonymous
    #209381

    Ok, thank you! I think about it. I have one more question: I use Post Views Counter Plugin, and when i place pvc_post_views(); function inside results.php template (address:/wp-content/themes/mytheme/search-filter/results.php) My filtering results are crashing (display nothing), when i click on filter buttons. What i need to do?

    Trevor
    #209419

    You want to display the number of post views for each result?

    This documentation page:

    https://dfactory.eu/docs/post-views-counter/developers-api/

    Suggests that the pvc_post_views() function is to be used like this:

    pvc_post_views( get_the_ID(), 1 );

    Anonymous
    #210411

    about problem with post views, i displayed pvc_post_views(get_the_ID(), true); in template, it works, but when i check filter, filter logic is crash (after uncheck filter, url is not clear), you can see it on this page

    Anonymous
    #210413
    Trevor
    #210447
    This reply has been marked as private.
    Anonymous
    #210449
    This reply has been marked as private.
    Trevor
    #210455
    This reply has been marked as private.
    Anonymous
    #210462
    This reply has been marked as private.
    Trevor
    #210470

    I cannot, sorry. Generally, the plugin you are using works, but there is something odd about that function in this context.

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