Skip to content

Instantly share code, notes, and snippets.

@OatmealBath
Last active August 29, 2015 14:06
Show Gist options
  • Save OatmealBath/805cfe4d6524004dc56b to your computer and use it in GitHub Desktop.
Save OatmealBath/805cfe4d6524004dc56b to your computer and use it in GitHub Desktop.
Redirect Gravity Forms to Wordpress page by id
// in functions.php
add_filter("gform_confirmation", "custom_confirmation", 10, 4);
function custom_confirmation($confirmation, $form, $lead, $ajax){
if($form["id"] == "1"){
$confirmation = array("redirect" =>get_page_link(191));
}
else if($form["id"] == "2"){
$confirmation = array("redirect" =>get_page_link(191));
}
// and on and on
return $confirmation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment