Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/set-a-post-format#post-179861
- // change the number 11 here to your post ID
- add_action('gform_after_submission_11', 'gf_set_post_format', 10, 2);
- function gf_set_post_format($entry, $form){
- // get post ID
- $postID = $entry['post_id'];
- // get the submitted post format
- // update this number to the field where your post format is submitted
- $format = $entry['3'];
- // set post format
- set_post_format($postID, $format);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement