Title: Remove inheritance
Last modified: June 18, 2018

---

# Remove inheritance

 *  Resolved [Sany](https://wordpress.org/support/users/sannny/)
 * (@sannny)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/remove-inheritance/)
 * Hello,
 * I want to remove the inheritance like described in this post:
    [https://wordpress.org/support/topic/option-to-remove-inheritance/](https://wordpress.org/support/topic/option-to-remove-inheritance/)
 * It’s an old post so I can’t find the code to change. Is there a new workaround
   for this?
 * Best regards
    saNNNy

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/remove-inheritance/#post-10415084)
 * Hey [@sannny](https://wordpress.org/support/users/sannny/),
 * Hope you’re well.
 * The plugin changed a lot until that thread time. So same solution can’t work 
   for the latest version of Custom Sidebars. But sidebar assigned for the actual
   sidebar. If you create a page template for parent page and set new sidebar area
   from theme files for parent page then it will not change for child pages. You
   can check this tutorial for creating custom template [https://premium.wpmudev.org/blog/creating-custom-page-templates-in-wordpress/](https://premium.wpmudev.org/blog/creating-custom-page-templates-in-wordpress/)
 * Cheers,
    Oguz
 *  Thread Starter [Sany](https://wordpress.org/support/users/sannny/)
 * (@sannny)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/remove-inheritance/#post-10418223)
 * Thanks for your advice. I created a page template with a custom theme widget 
   for this (`register_sidebar($args)`). Now everything looks like it should. Fortunately
   there are one some pages that are affected.
 * Thank you very much and have a nice day
    saNNNy
 *  [majorrobot](https://wordpress.org/support/users/majorrobot/)
 * (@majorrobot)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/remove-inheritance/#post-10960493)
 * You can also check for the correct sidebars on the page:
 *     ```
       // Get only this page's sidebars.
       global $post;
       $meta = get_post_meta($post->ID, '_cs_replacements', true );
       $active_sidebars = array_keys($meta);
   
       // Only show correct sidebars.
       if (is_active_sidebar( 'my-sidebar' ) && in_array('my-sidebar', $active_sidebars) ) {
         dynamic_sidebar( 'my-sidebar' );
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove inheritance’ is closed to new replies.

 * ![](https://ps.w.org/custom-sidebars/assets/icon-256x256.png?rev=1414065)
 * [Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager](https://wordpress.org/plugins/custom-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-sidebars/reviews/)

## Tags

 * [inheritance](https://wordpress.org/support/topic-tag/inheritance/)

 * 3 replies
 * 3 participants
 * Last reply from: [majorrobot](https://wordpress.org/support/users/majorrobot/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/remove-inheritance/#post-10960493)
 * Status: resolved