diff --git a/source/wp-content/themes/wporg-main-2022/functions.php b/source/wp-content/themes/wporg-main-2022/functions.php index 6003c79c..d4aba0d3 100644 --- a/source/wp-content/themes/wporg-main-2022/functions.php +++ b/source/wp-content/themes/wporg-main-2022/functions.php @@ -250,6 +250,16 @@ function add_site_navigation_menus( $menus ) { * @param WP_Block $instance The block instance. */ function use_parent_page_title( $block_content, $block, $instance ) { + + // Handle the site title for data liberation. + if ( is_post_type_archive( 'and-handbook') || is_singular( 'and-handbook' ) ) { + return str_replace( + array( home_url(), get_bloginfo( 'name' ) ), + array( home_url( '/data-liberation' ), __( 'Data Liberation', 'wporg' ) ), + $block_content + ); + } + if ( is_home() || is_single() || is_archive() ) { return str_replace( array( home_url(), get_bloginfo( 'name' ) ), diff --git a/source/wp-content/themes/wporg-main-2022/inc/data-liberation-handbook.php b/source/wp-content/themes/wporg-main-2022/inc/data-liberation-handbook.php index afd53ef5..47aae21b 100644 --- a/source/wp-content/themes/wporg-main-2022/inc/data-liberation-handbook.php +++ b/source/wp-content/themes/wporg-main-2022/inc/data-liberation-handbook.php @@ -15,7 +15,7 @@ function add_data_liberation_handbook( $handbooks ) { $handbooks['and'] = [ 'label' => 'Data Liberation Guides', 'manifest' => 'https://raw.githubusercontent.com/WordPress/data-liberation/add/manifest/assets/manifest.json', // TODO: See https://github.com/WordPress/data-liberation/pull/46 - 'slug' => 'and', + 'slug' => 'data-liberation/and', ]; return $handbooks; diff --git a/source/wp-content/themes/wporg-main-2022/patterns/_nav-data-liberation.php b/source/wp-content/themes/wporg-main-2022/patterns/_nav-data-liberation.php new file mode 100644 index 00000000..8725dc75 --- /dev/null +++ b/source/wp-content/themes/wporg-main-2022/patterns/_nav-data-liberation.php @@ -0,0 +1,25 @@ + + + + + + + + + + + + +
+ + + +
\ No newline at end of file diff --git a/source/wp-content/themes/wporg-main-2022/patterns/data-liberation-guides.php b/source/wp-content/themes/wporg-main-2022/patterns/data-liberation-guides.php index 36a72d58..de95726c 100644 --- a/source/wp-content/themes/wporg-main-2022/patterns/data-liberation-guides.php +++ b/source/wp-content/themes/wporg-main-2022/patterns/data-liberation-guides.php @@ -7,19 +7,18 @@ ?> - -

Guides

+ +
+

Guides

- +
- - +
- @@ -29,4 +28,5 @@
- +
+ \ No newline at end of file diff --git a/source/wp-content/themes/wporg-main-2022/templates/archive-and-handbook.html b/source/wp-content/themes/wporg-main-2022/templates/archive-and-handbook.html new file mode 100644 index 00000000..9b7e7bbf --- /dev/null +++ b/source/wp-content/themes/wporg-main-2022/templates/archive-and-handbook.html @@ -0,0 +1,11 @@ + + + + + +
+ +
+ + + diff --git a/source/wp-content/themes/wporg-main-2022/templates/page-data-liberation-guides.html b/source/wp-content/themes/wporg-main-2022/templates/page-data-liberation-guides.html deleted file mode 100644 index 310bffa2..00000000 --- a/source/wp-content/themes/wporg-main-2022/templates/page-data-liberation-guides.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - -
- -
- - - diff --git a/source/wp-content/themes/wporg-main-2022/templates/page-data-liberation-guide-single.html b/source/wp-content/themes/wporg-main-2022/templates/single-and-handbook.html similarity index 81% rename from source/wp-content/themes/wporg-main-2022/templates/page-data-liberation-guide-single.html rename to source/wp-content/themes/wporg-main-2022/templates/single-and-handbook.html index bffa9c99..e25d36db 100644 --- a/source/wp-content/themes/wporg-main-2022/templates/page-data-liberation-guide-single.html +++ b/source/wp-content/themes/wporg-main-2022/templates/single-and-handbook.html @@ -1,12 +1,6 @@ - - - - - - - +