Title: Code for Clone Children Bug
Last modified: January 19, 2026

---

# Code for Clone Children Bug

 *  [thewebtailors](https://wordpress.org/support/users/thewebtailors/)
 * (@thewebtailors)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/code-for-clone-children-bug/)
 * First of all, awesome plugin! When I check “Clone Children” on my custom post
   type, the Nested Pages plugin does not clone the children, only the selected 
   post.
 * I dug through the code and found that in wp-content/plugins/wp-nested-pages/app/
   Entities/Post/PostCloner.php line 81 it should be
 *     ```wp-block-code
           if ( $post_type === 'page' ) $post_type = ['page', 'np-redirect'];
       ```
   
 * instead of
 *     ```wp-block-code
       if ( $post_type = 'page' ) $post_type = ['page', 'np-redirect'];
       ```
   
 * Do you mind correcting it for your next release. Thank you! 🙂

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-for-clone-children-bug%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-nested-pages/assets/icon-128x128.png?rev=1690043)
 * [Nested Pages](https://wordpress.org/plugins/wp-nested-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-nested-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-nested-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-nested-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-nested-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-nested-pages/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [thewebtailors](https://wordpress.org/support/users/thewebtailors/)
 * Last activity: [4 months, 2 weeks ago](https://wordpress.org/support/topic/code-for-clone-children-bug/)
 * Status: not resolved