travisL-2
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Showing icons with links in place of text for mobile devices.
Started by: travisL-2 in: Types Community Support |
2 | 2 | 6 years, 8 months ago | ||
Use parent post title to create child post’s title with CRED
Started by: travisL-2
in: Types Community Support
Problem: I am using CRED to create child posts. I would like to programmatically set the child post title based on the parent post title. I'm using the beta plugins. Solution: add_action('cred_save_data', 'copy_parent_title_to_child',10,2); function copy_parent_title_to_child($post_id, $form_data) { // if a specific form if ($form_data['id']==429) { if (isset($_POST['@member_visitation_parent'])) { $my_post = array( 'ID' => $post_id, 'post_title' => get_the_title($_POST['@member_visitation_parent']) ); wp_update_post( $my_post ); } } } |
2 | 14 | 6 years, 8 months ago |