Rebuild Cache Hook/Filter?

Forums › Forums › Search & Filter Pro › Rebuild Cache Hook/Filter?

Tagged: 

Viewing 8 posts – 1 through 8 (of 8 total)
  • Anonymous
    #156070

    Is there a rebuild cache filter I can use? I use this plugin on a custom wordpress job board. Every 45 days, post dates are changed to current date, making posts new again. Unfortunately, this is not reflected on the front end. I have to manually click “Rebuild Cache”.

    Is there a filter I can hook into run “Rebuild Cache” inside my change post date function?

    Trevor
    #156281

    The only one we have works on individual posts. Is your code is stepping through a loop to do the updates, or is it using one global SQL query?

    Anonymous
    #156435

    It’s through a foreach loop for the get_posts function.

    Trevor
    #156439

    You may be able to use this action then:

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

    Where you will have a variable with the post ID as you loop through, and replace the post ID in the example code with that variable.

    Anonymous
    #156460

    Sweet, thanks!!

    Anonymous
    #156468

    One more question. I can just add that action within the function I created to update the post date, yes?

    Trevor
    #156470

    Yes.

    Anonymous
    #156472

    Thank you

Viewing 8 posts – 1 through 8 (of 8 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.