Forums Forums Search & Filter Pro Search&Filter Pro with ACF : value not showing

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #197500

    Hello
    I am using Search&Filter Pro with ACF.
    I have some Custom Fields that i have loaded with WP-CLI scripts. The terms loaded this way are not showing on the Search form at first. I need to make a change and save the post on the BackOffice of WordPress in order to make it appear. I have 2000 posts to update, is there a way to force Search&Filter to look at thoses terms with a script ?
    Thank you

    Trevor
    #197555

    In the script that you use, you need it to be written in such a way as it loops through one post at a time, and as the individual post loop ends, it saves the data. At this point you need to retrieve the Post ID, and then use this action:

    https://searchandfilter.com/documentation/action-filter-reference/#update-cache-for-a-particular-post

    This will trigger the same action in our plugin as though you had pressed the Update post button in the editor.

    The problem is arising because the script you are using is probably not using the WordPress save_post() function.

    Trevor
    #197579

    Please note that we are now into a holiday period in the UK. We will be working for some of this period, but replies may be delayed at times.

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