Set page template automatically according to parent slug
You can override the hierarchy and load a specific page template via the page_template filter. The fastest way is to identify the parent page by ID: function wpd_page_template_filter( $template ){ $page = get_queried_object(); if( 42 == $page->post_parent ){ // en page has ID of 42 $template = locate_template( ‘page-en.php’ ); } return $template; } add_filter( … Read more