Forums Forums Search & Filter Pro Search Filter pro not updating when post submitted via gravity forms

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #161355

    Hi There, I’m using gravity forms for user generated content in the frontend. All is working fine, posts are published with no errors and appear immediately in normal wordpress queries. However they don’t appear on SF results pages unless I manually go into admin and resave them. Is there anything I can do about this. I tried to use this, but it doesnt work:

    add_action( 'gform_after_submission_2', 'updatecache', 10, 2 );
    function updatecache( $entry, $form ) {
      $post = get_post( $entry['post_id'] );
      do_action("search_filter_update_post_cache", $post);
    }

    Any guidance would be much appreciated!
    All the best, Charlie

    Trevor
    #161439

    I can’t find any reference to gform_after_submission_2 but I can see some code snippets with gform_after_submission in.

    Do you have a link to the Gravity Forms documentation for this?

    Anonymous
    #161460

    Hi Trevor,
    the 2 just refers to the form ID – have tried both ways: https://docs.gravityforms.com/gform_after_submission/

    Trevor
    #161505

    All that I am able to confirm is that this line is correct:

    do_action("search_filter_update_post_cache", $post);
    

    Insofar as the $post variable does indeed contain the Post ID. The rest of the code you would need to confirm with Gravity Forms.

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