44 lines
946 B
PHP
44 lines
946 B
PHP
<?php
|
|
/**
|
|
* 首页模板:最新文章在首页时走列表;静态首页走页面内容
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
if (function_exists('aksrt_render_fixed_homepage') && aksrt_render_fixed_homepage()) {
|
|
return;
|
|
}
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
|
<?php $has_sidebar = is_active_sidebar('sidebar-blog'); ?>
|
|
<div class="content-layout<?php echo $has_sidebar ? '' : ' content-layout--no-sidebar'; ?>">
|
|
<div class="content-layout__primary">
|
|
<?php
|
|
while ( have_posts() ) :
|
|
the_post();
|
|
?>
|
|
<article <?php post_class(); ?>>
|
|
<header class="entry-header">
|
|
<h1 class="entry-title"><?php the_title(); ?></h1>
|
|
</header>
|
|
<div class="entry-content">
|
|
<?php the_content(); ?>
|
|
</div>
|
|
</article>
|
|
<?php
|
|
endwhile;
|
|
?>
|
|
</div>
|
|
|
|
<?php if ($has_sidebar) : ?>
|
|
<?php get_sidebar(); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</main>
|
|
|
|
<?php
|
|
get_footer();
|