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)