Forums Forums Search & Filter Pro Only show updated items in serach result

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #90212

    Hi,
    I have a search form that handles a custom post type. The CPT is imported with the plugin WP All import pro and I can see that the items get imported as they should. The problem is that the items do not show in the search result by default. If I update some information on one item and saves it, then the item is displayed in the search result.
    Why are the items not included in the search result by default? All the imported items has status “published” but only the ones that are updated manually are displayed.

    Since there are about 2000 items it will be a tedious work to update them all manually…

    Version:
    Wordpress 4.7.2
    Search & Filter Pro 2.3.2

    Trevor
    #90303

    I believe this is an issue with the way WP All Import does things, as I said in this thread:

    https://support.searchandfilter.com/forums/topic/will-the-cache-rebuild-automatically/

    We have an action that will do this, but it has to be inserted in their plugin’s code to run after each post has been made. Maybe the author can suggest where to put this and the exact code to use.

    Anonymous
    #90319

    Hi,
    I’m not so familiar with the cache on the webserver but I can see all the imported items in another page that doesn’t contain the search form and result, which only lists the CPT in an archive page. So the items are available, both in frontend and in backend. It’s just in the page where the search form and search result are displayed that they don’t show up.

    Is this caused by the cache?

    Trevor
    #90322

    Yes. When a post is created or updated, WordPress broadcasts this to any code that needs to know. Our plugin listens for this and updates the cache for that one post that is either new or changed.

    But, when bulk importers bring in posts, they can be coded to bypass the normal WordPress systems and thus any code that needs to know, doesn’t. It strikes me that to circumvent the normal WordPress process is not a good thing. But this is what the import plugin you are using is doing. Not all import plugins do this.

    Anonymous
    #90328

    OK!
    Thanks for educating me in this matter! I will contact the plugin provider to let them know.

    Trevor
    #90330

    Well, all that is needed is for them to show where that action:

    do_action('search_filter_update_post_cache', 23);
    

    Where 23 is the post ID, so my guess is that will have to be replaced by a variable. OR, they may have a filter that can be used to call that do_action.

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