Files
CyyWordpress/index.php
T
2021-02-28 23:44:31 +08:00

84 lines
2.1 KiB
PHP

<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package CyyWordpress
*/
get_header();
?>
<section class="section">
<div class="container">
<!-- <h1 class="title">
<?php /*bloginfo( 'name' ); */?>
</h1>-->
<p class="subtitle">
<?php bloginfo( 'description' ); ?>
</p>
</div>
</section>
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" >
<span class="icon is-small">
<i class="fas fa-home" aria-hidden="true"></i>
</span>
<span>首页</span>
</a>
</li>
</ul>
</nav>
<div class="notification is-primary">
欢迎来到这! <strong>Hello everyone.</strong>
</div>
<?php
if ( have_posts() ) :
if ( is_home() && ! is_front_page() ) :
?>
<p class="title is-4"><?php single_post_title(); ?></p>article
<?php
endif;
/* Start the Loop */
while ( have_posts() ) :
the_post();
/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_type() );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<?php
get_sidebar();
get_footer();