Skip to content

Instantly share code, notes, and snippets.

@svenl77
Last active May 16, 2017 11:32
Show Gist options
  • Select an option

  • Save svenl77/3e3382835db98723b5fa8fe4bfbe594b to your computer and use it in GitHub Desktop.

Select an option

Save svenl77/3e3382835db98723b5fa8fe4bfbe594b to your computer and use it in GitHub Desktop.
buddyforms_wp_insert_post_args
<?php
add_filter( 'buddyforms_wp_insert_post_args', 'my_buddyforms_wp_insert_post_args', 10, 2);
function my_buddyforms_wp_insert_post_args( $args, $forms_slug ){
if( $forms_slug == 'FORM SLUG' ){
$args['page_template'] = 'template-name.php';
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment