Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用循环来查询特定帖子并在我的页面上显示帖子内容、标题和自定义字段?
我在想这样的事情:
if (have_posts() && the_post().id == 66) : while (have_posts()) : the_post();
听起来您需要使用query_posts()where p = post_id (1)
query_posts()
<?php query_posts('p=1'); ?> <?php while (have_posts()) : the_post(); ?> <?php the_title(); ?> <?php the_content(); ?> <?php endwhile; ?>