浏览代码

Blockbase: Fix 404 template (#4402)

* Blockbase: Fix the 404 template

* Blockbase: Fix the 404 template

* Add a 404 for skatepark

* update footer tag

* fix textdomain
Ben Dwyer 3 年之前
父节点
当前提交
e9287679e9
共有 4 个文件被更改,包括 54 次插入13 次删除
  1. 7 13
      blockbase/404.php
  2. 11 0
      blockbase/footer.php
  3. 18 0
      blockbase/header.php
  4. 18 0
      skatepark/404.php

+ 7 - 13
blockbase/404.php

@@ -5,20 +5,14 @@
  * @package Blockbase
  * @package Blockbase
  * @since 1.1.1
  * @since 1.1.1
  */
  */
-wp_head();
-
-echo gutenberg_block_template_part( 'header' );
+get_header();
 ?>
 ?>
+	<main class="container-404">
+		<h1 class="has-text-align-center has-large-font-size"><?php _e( 'Oops! That page can&rsquo;t be found.', 'blockbase' ); ?></h1>
 
 
-<main class="container-404">
-	<h1 class="has-text-align-center has-large-font-size"><?php _e( 'Oops! That page can&rsquo;t be found.', 'blockbase' ); ?></h1>
-
-	<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'blockbase' ); ?></p>
-
-	<?php echo do_blocks('<!-- wp:search {"label":""} /-->'); ?>
-</main>
+		<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'blockbase' ); ?></p>
 
 
+		<?php echo do_blocks('<!-- wp:search {"label":""} /-->'); ?>
+	</main>
 <?php
 <?php
-echo gutenberg_block_template_part( 'footer' );
-
-wp_footer();
+get_footer();

+ 11 - 0
blockbase/footer.php

@@ -0,0 +1,11 @@
+<footer class="wp-block-template-part site-footer-container">
+		<?php
+			echo gutenberg_block_template_part( 'footer' );
+		?>
+	</div>
+</footer>
+
+<?php wp_footer(); ?>
+
+</body>
+</html>

+ 18 - 0
blockbase/header.php

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+<head>
+	<meta charset="<?php bloginfo( 'charset' ); ?>" />
+	<meta name="viewport" content="width=device-width, initial-scale=1" />
+	<link rel="profile" href="https://gmpg.org/xfn/11" />
+	<?php wp_head(); ?>
+</head>
+
+<body <?php body_class(); ?>>
+<?php wp_body_open(); ?>
+
+	<div class="wp-site-blocks">
+		<header class="wp-block-template-part">
+			<?php
+				echo gutenberg_block_template_part( 'header' );
+			?>
+		</header>

+ 18 - 0
skatepark/404.php

@@ -0,0 +1,18 @@
+<?php
+/**
+ * The template for displaying 404 pages (not found)
+ *
+ * @package Skatepark
+ * @since 1.1.1
+ */
+get_header();
+?>
+	<main class="container-404">
+		<h2 class="wp-block-post-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'skatepark' ); ?></h1>
+
+		<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'skatepark' ); ?></p>
+
+		<?php echo do_blocks('<!-- wp:search {"label":""} /-->'); ?>
+	</main>
+<?php
+get_footer();