Grunion Ajax
duplicates the post body after the form is submitted (2 posts)

  1. Sam_a
    Posted 4 years ago #

    Hi Brent,

    The form is submitted successfully, but the ajax response inserts the entire post body (including the "Message Sent" confirmation, etc.) where the form used to be, so the post content appears twice!

    I know that can't be right, but I noticed that grunion-ajax.php seems to grab the entire post content

    $content = do_shortcode( $post->post_content ); (grunion-ajax.php: 80)

    for the ajax response and then inserts it into the form wrapper (like div#contact-form-id-1), and that would produce exactly the wrong behavior that I'm seeing.

    Any advice?


  2. Simon Prosser
    Theme Review Admin
    Posted 4 years ago #

    Change that line to:

    $content = do_shortcode( $post->post_content );
    		preg_match( '#<blockquote>.*</blockquote>#sm', $content, $out );
    		$content = $out[0];

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Grunion Ajax
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic