title: Change Wordpress theme programatically for logged in users
body: <p>I need to change the wordpress website theme for logged in users. I figured this code:</p>
  
  <pre><code>require_once (ABSPATH . WPINC . '/pluggable.php');
  add_filter( 'template', 'change_theme_template' );
  add_filter( 'stylesheet', 'change_theme_template' );
  function change_theme_template( $template ) {
  
      if ( is_user_logged_in() ) :\
           $template = 'twentyfifteen';
      endif;
  
      return $template;
  }
  </code></pre>
  
  <p>But it works only for parent themes, it does not work for child theme. I can't find a function to make it work with children. Is there a way to do it? Thank you</p>