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.

Forums Forums Search & Filter Pro Counts on filters not refreshing

Viewing 10 posts - 1 through 10 (of 13 total)
  • riseup
    #78582

    Hello.

    My website is http://www.ymphony.com.

    At the top of the homepage, there are 2 drop down filters – college and school category. Notice the numeric count values next to each of the values. I like that feature as it gives the user an indicator of how many posts are related to that particular item.

    My issue that I am facing is the following: any time a user creates a new page/post, the filters for the item should increase by 1 automatically once the page/post is created.

    However, the filters do not show thr updated count value. In order for the user to see all updates counts on both filters, I have to go to the search and filter admin page and click the Refresh Cache button.

    Once the refresh cache is done and I go back to the homepage, then the counts are refreshed and now I can see the new page/post on the filters.

    Question: I don’t want to keep clicking the refresh cache button every time I or somebody creates a new page/post.

    I’ve been scratching my head on this one for a while now.

    Thank you.

    Trevor Moderator
    #78596

    If the user is creating posts in the back end, this should indeed auto update the cache. Does the new post NEVER appear (unless you manually update the S&F cache), or will it appear after after some time, like a day?

    If they are creating the posts in the front end, this might be a different matter, and it might depend how they are creating posts.

    riseup
    #78598

    This scenario is all about creating posts from the front end. All users create posts when clicking on the New Page link once logged in (and registered).

    I don’t believe it will show in the filters even after a day.

    So, can you provide guidance on this scenario? Fixable? Thanks Trevor.

    Trevor Moderator
    #78600

    Are you using a plugin (like a form) to make these new posts, in which case, yes, it can be addressed. after the save is done by the form, you need to tack on to their code a little extra snippet. See here in the documentation:

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

    Where you can probably get the saving routine to return the saved post ID as a variable (probably using get_the_ID() or similar.

    If you showed that line of code to the plugin author, they could probably tell you what to do.

    riseup
    #97087
    This reply has been marked as private.
    Trevor Moderator
    #97090

    I asked before if you were using a plugin (like a form) to make these posts, but I am unsure if you answered that.

    riseup
    #97092
    This reply has been marked as private.
    Trevor Moderator
    #97112

    Ah yes, I remember from another post you said this. It is some time since we exchanged posts. I will need to talk to Ross and get back to you.

    riseup
    #97118
    This reply has been marked as private.
    Trevor Moderator
    #97212
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 13 total)

The topic ‘Counts on filters not refreshing’ is closed to new replies.