Livro: Add 404 pattern (#5391)
* Livro: Add 404 pattern * Make the search text translatable
This commit is contained in:
parent
e4d754d6c9
commit
fec39b096a
2 changed files with 16 additions and 0 deletions
|
@ -56,6 +56,7 @@ function livro_register_block_patterns() {
|
|||
'header-left-right-logo',
|
||||
'header-left-right-logo-title',
|
||||
'header-title-tagline-social',
|
||||
'hidden-404',
|
||||
'page-about',
|
||||
'page-contact',
|
||||
);
|
||||
|
|
15
livro/inc/patterns/hidden-404.php
Normal file
15
livro/inc/patterns/hidden-404.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* 404 content.
|
||||
*/
|
||||
return array(
|
||||
'title' => __( '404 content', 'livro' ),
|
||||
'inserter' => false,
|
||||
'content' => '<!-- wp:heading {"style":{"typography":{"fontSize":"clamp(4rem, 40vw, 20rem)","fontWeight":"200","lineHeight":"1"}},"className":"has-text-align-center"} -->
|
||||
<h2 class="has-text-align-center" style="font-size:clamp(4rem, 40vw, 20rem);font-weight:200;line-height:1">' . esc_html( _x( '404', 'Error code for a webpage that is not found.', 'livro' ) ) . '</h2>
|
||||
<!-- /wp:heading -->
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center">' . esc_html__( 'This page could not be found. Maybe try a search?', 'livro' ) . '</p>
|
||||
<!-- /wp:paragraph -->
|
||||
<!-- wp:search {"label":"' . esc_html__( 'Search', 'livro' ) . '","showLabel":false,"width":50,"widthUnit":"%","buttonText":"' . esc_html__( 'Search', 'livro' ) . '","buttonUseIcon":true,"align":"center"} /-->',
|
||||
);
|
Loading…
Reference in a new issue