Anton | натяжка страницы test1
This commit is contained in:
36
wp-content/themes/twentytwentyfour/page-test1.php
Normal file
36
wp-content/themes/twentytwentyfour/page-test1.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Standalone landing template for the page slug "test1".
|
||||
*
|
||||
* @package Twenty_Twenty_Four
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
*/
|
||||
|
||||
$landing_file = ABSPATH . 'index3.html';
|
||||
$landing_html = file_exists( $landing_file ) ? file_get_contents( $landing_file ) : false;
|
||||
?><!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class( 'test1-landing-page' ); ?>>
|
||||
<?php wp_body_open(); ?>
|
||||
<?php
|
||||
if ( $landing_html && preg_match( '/<body[^>]*>(.*)<\/body>/is', $landing_html, $matches ) ) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo $matches[1];
|
||||
} else {
|
||||
?>
|
||||
<main class="site-main" role="main">
|
||||
<div style="padding:48px 16px;max-width:1180px;margin:0 auto;">
|
||||
<p>Не удалось загрузить шаблон страницы `index3.html`.</p>
|
||||
</div>
|
||||
</main>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user