Skip to content

Instantly share code, notes, and snippets.

@Fitoussi
Created April 29, 2016 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fitoussi/f6c599fb30b1f7d873c77c2f3148b55e to your computer and use it in GitHub Desktop.
Save Fitoussi/f6c599fb30b1f7d873c77c2f3148b55e to your computer and use it in GitHub Desktop.
gmw form submission conditional
// if form ID 1 submitted show results
// change the value 1 to the ID of your form
if ( !empty( $_GET['action'] ) && $_GET['action'] == 'gmw_post' && !empty( $_GET['gmw_form'] ) && $_GET['gmw_form'] == 1 ) {
echo do_shortcode( '[gmw form="results"]' );
// otherwise, show content.
} else {
echo 'some content';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment