代码拉取完成,页面将自动刷新
<?php
/**
* The template for displaying page.
* @package yii
* 单页(静态页面)
*/
?>
<?php get_header(); ?>
<div class="container sample-container">
<?php if(have_posts()) : //检查博客是否有日志 ?>
<div class="main page-main">
<?php while(have_posts()) : the_post(); //执行 the_post() 去调取日志 ?>
<div id="post-<?php the_ID(); //调取日志ID ?>" class="post page">
<div class="entry">
<div class="article-inner">
<header class="entry-header">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</header><!-- /header -->
<div class="entry-summary">
<?php the_content();//全文 ?>
<?php wp_link_pages('页码:', '', 'number');//当在页面中使用<!--nextpage-->进行分页时,下方显示页码 ?>
<?php edit_post_link('编辑', '', ''); ?>
</div>
<div class="clear"></div>
<div class="post-continue-container">
<?php get_template_part("template/shang"); ?>
</div>
</div>
</div>
<div class="clear"></div>
<?php if(comments_open()): ?>
<div id="comments" class="comments-area">
<?php comments_template();//评论模板 ?>
</div>
<?php endif; ?>
</div>
<?php endwhile; ?>
</div>
<?php else : //博客没有日志的时候执行 ?>
<div class="main">
<div class="post">
<h2><?php _e('哎呀,你找的页面似乎已经不在地球上啦...'); ?></h2>
</div>
</div>
<?php endif; ?>
</div>
<?php get_footer(); ?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。