This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Index Updates

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19383
    Mike GraciMike Graci
    Participant

    Hi

    I have the index built around a few pieces fo custom data. When I change the custom data…I was expecting the index to be updated…so that few changes reflect the new content.

    How does this work?

    Will provide details via email if you need to get into site.

    Thanks
    Mike

    #19388
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Mike,

    The index table update is automatically triggered when a post is altered (saved, updated, published etc..). Namely, when the following filters are triggered, the index table automatically re-indexes the post that is currently changed: save_post, wp_insert_post

    These hooks are automatically triggered, when making changes via the plugin editor, or within any interactive editor out there. Manually changing anything via code or directly in the database will not trigger these events.

    If you are using a custom code to make changes, then the save_post filter needs to be triggered, so that hooks connected to this event are fired properly. To do that, you can either update the post manually afterwards via the editor, or try running these lines after the change integrating them into your custom code:

    The $post_id variable should be changed to the one that contains the currently changed post ID.

    #19398
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Index Updates’ is closed to new replies.