Skip Navigation

[Resolved] How to automatically change the child author when parent author changes

This thread is resolved. Here is a description of the problem and solution.

Problem: How to change author of child post based on parent post.

Solution: You can update the child post author by using the CRED hook: "cred_save_data".

You can find proposed solution with the following reply:

Relevant Documentation: => =>

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.


This topic contains 2 replies, has 2 voices.

Last updated by Amin 5 years ago.

Assigned support staff: Minesh.


Can you tell me how I can automatically update the author of a child post when the author of it's parent changes?

I have a CRED form where I can change the author of the parent. What i'm looking for is a way to AUTOMATICALLY update the child post's author accordingly.

Can you help?



Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You can update the child post author by using the CRED hook: "cred_save_data"

For example - Add following code to your current theme's functions.php file:

add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
    // if a specific form
    if ($form_data['id']==9999)
         // get your child id based on parent id 
        // once you get child id - write your code to assign author to your child

Where :
Replace "9999" with your CRED parent form ID

You can go through the following Docs to know how to fetch child:

I hope above solution will help you to resolve your issue.


Thank you.