Forums › Forums › Search & Filter Pro › Counts on filters not refreshing
- This topic has 12 replies, 2 voices, and was last updated 9 years ago by
Anonymous.
-
Anonymous(Private) December 24, 2016 at 4:11 pm #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(Private) December 24, 2016 at 6:57 pm #78596If 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.
Anonymous(Private) December 24, 2016 at 7:02 pm #78598This 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(Private) December 24, 2016 at 7:26 pm #78600Are 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:
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.
-
AuthorPosts