且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 wordpress 主题中创建单个帖子页面?

更新时间:2023-12-02 08:37:04

在 single.php 中你必须使用 loop

In single.php you have to use loop

这里是文档:Codex尝试:(在 single.php 中):

Here is documentation: Codex Try: (in single.php):

<?php while ( have_posts() ) : the_post(); ?>
<h3><?php the_category('&nbsp;&rsaquo;&nbsp;'); echo "&nbsp;&rsaquo;&nbsp;"; the_title(); ?></h3>
<?php the_content(); ?>
<?php endwhile; // end of the loop. ?>

当然,你必须设计它.