• Resolved Julie Kuehl

    (@juliekuehl)


    I am working on creating a child theme for the lovely Chaplin theme and I’d like to unset some of the page templates from the dropdown options in the Post Attributes. I have been able to successfully unset them from the Page Attributes, but it is not working for the Post Attributes. Do you know of any reason why this might be?

    /* Remove parent theme page templates */
    
    function child_remove_page_templates( $page_templates ) {
      unset( $page_templates['template-cover.php'] );
      unset( $page_templates['template-only-content.php'] );
    
      return $page_templates;
    }
    add_filter( 'theme_page_templates', 'child_remove_page_templates' );
    • This topic was modified 4 years, 10 months ago by Julie Kuehl.
    • This topic was modified 4 years, 10 months ago by Julie Kuehl.
    • This topic was modified 4 years, 10 months ago by Julie Kuehl.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Page Templates in Child Theme’ is closed to new replies.