Created
April 29, 2016 00:07
-
-
Save Fitoussi/f6c599fb30b1f7d873c77c2f3148b55e to your computer and use it in GitHub Desktop.
gmw form submission conditional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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