替换没有插件的子页面的侧边栏

I'm trying to get a different sidebar to load within child pages of a particular parent without the use of a plugin or setting up another template file.

This is what I have so far:

register_sidebars(1, array(
'name' => 'Other Sidebar',
'id' => "other-sidebar",
'before_widget' => '<li class="widget">',
'after_widget' => '</li>',
'before_title' => '<span class="widgettitle">',
'after_title' => '</span>'
));

if ( $post->post_parent == '1164' ) {
dynamic_sidebar( 'other-sidebar' );
}

But I'm wondering if I need use a filter of some sort to replace the default sidebar that is being loaded instead? Not too sure if that's correct or not.

Since you can edit the theme (or child theme) you could add a Page Template that would override the current page template with the custom sidebar you want.

<?php 
/*
Template Name: Custom Sidebar Page // All versions
Template Post Type: page // 4.7+ only
*/

// Page code here with the sidebar you want...
?>

<aside id="secondary" class="widget-area" role="complementary">
    <?php dynamic_sidebar( 'other-sidebar' ); ?>
</aside><!-- #secondary -->

Then, in the edit for your page and it's child pages, set this template as the one you want.