wordpress中的多个特定帖子
所以我在word press中遇到了一个问题。我想在word press中显示特定的帖子,但我不知道怎么做,或者没有逻辑。我使用的代码非常有效wordpress中的多个特定帖子,wordpress,post,Wordpress,Post,所以我在word press中遇到了一个问题。我想在word press中显示特定的帖子,但我不知道怎么做,或者没有逻辑。我使用的代码非常有效 <div id="1"> // retrieve one post with an ID of 1 query_posts('p=1'); global $more; $more = 0; // the Loop while (have_posts()) : the_post(); // the content of the post th
<div id="1">
// retrieve one post with an ID of 1
query_posts('p=1');
global $more;
$more = 0;
// the Loop
while (have_posts()) : the_post();
// the content of the post
the_content();
endwhile;
?>
</div>
//检索一个ID为1的帖子
查询职位(p=1);
全球收入增加1美元;
$more=0;
//环路
while(have_posts()):the_post();
//文章的内容
_内容();
结束时;
?>
好!!现在我希望它像这样显示,似乎找不到逻辑如何做到这一点
<div id="1">
// POST 1 here
</div>
<div id="2">
// POST 2 Here
</div>
<div id="3">
// POST 3 Here
</div>
//在这里张贴1
//在这里张贴2
//在这里张贴3
谢谢给你。:)我修改了query\u posts
调用,按ID排序,并按升序排序(例如:1、2、3、5、29、199等)
给你。:)我修改了query\u posts
调用,按ID排序,并按升序排序(例如:1、2、3、5、29、199等)
<?php
// retrieve one post with an ID of 1
query_posts('orderby=ID&order=ASC');
global $more;
$more = 0;
// the Loop
while (have_posts()) : the_post();
?>
<div id="<?=get_the_ID()?>"><?=get_the_content()?></div>
<?php
endwhile;
?>