From f70e9a5c8749f3129fccfcf4e2d8ddd2e2ca8825 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 10 Dec 2019 09:05:11 +0000 Subject: [PATCH] Add template so page loads correct breadcrumb (#259) The region landing template was not available to editors, meaning that their region landing page was defaulting to the default template. By using the default template rather than the regional landing template, there was a knock on effect in that the wrong breadcrumb loaded. --- .../clarity/inc/admin/custom-page-attribute-box.php | 9 ++++----- wp-content/themes/clarity/page_regional_landing.php | 6 +++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-content/themes/clarity/inc/admin/custom-page-attribute-box.php b/wp-content/themes/clarity/inc/admin/custom-page-attribute-box.php index cb6417abd..389fe623f 100644 --- a/wp-content/themes/clarity/inc/admin/custom-page-attribute-box.php +++ b/wp-content/themes/clarity/inc/admin/custom-page-attribute-box.php @@ -46,14 +46,13 @@ function clarity_custom_page_attribute_box( $post ) { $parent_page = wp_get_post_parent_id( $post->ID ); - - // current template selected by user - $current_template = get_post_meta( $post->ID, '_wp_page_template', true ); + // current template selected by user + $current_template = get_post_meta( $post->ID, '_wp_page_template', true ); // get full list of templates - $templates = get_page_templates($post); + $templates = get_page_templates($post); - $themeselect = ''; foreach ( $templates as $template_name => $template_filename ) { diff --git a/wp-content/themes/clarity/page_regional_landing.php b/wp-content/themes/clarity/page_regional_landing.php index c07b08841..b3a1459db 100644 --- a/wp-content/themes/clarity/page_regional_landing.php +++ b/wp-content/themes/clarity/page_regional_landing.php @@ -4,7 +4,7 @@ /** * * Template name: Region landing - * + * Template Post Type: regional_page */ $terms = get_the_terms( get_the_ID(), 'region' ); @@ -28,6 +28,10 @@

+
+ +
+ '; get_news_api( 'regional_news' );