WordPress Chinese Forums's Archiver

lanlanxin 发表于 2008-11-10 14:11

还是指定按ID输出文章标题问题

马甲前辈 这样写还是不行 只有第一个ID的标题  不知道是为什么呢
<ul>
        <?php query_posts([color=red]'showposts=6[/color]&p=62,317,679,683,211,712'); ?>
<?php while (have_posts()) : the_post(); ?>
        <li><a href="<?php the_permalink() ?>" rel="bookmark">
                <?php the_title(); ?>
                </a><span class="pricered"><?php echo get_post_meta($post->ID, "price", true); ?></span></li>
                <?php endwhile; ?>            
  </ul>

马甲 发表于 2008-11-10 14:58

不好意思我没测试,测试果然不行,呵呵
以下代码已经测试:
<ul>
<?php query_posts(array('post__in' => array(62,317,679,211,712))); ?>
<?php while (have_posts()) : the_post(); ?>
        <li><a href="<?php the_permalink() ?>" rel="bookmark">
                <?php the_title(); ?>
                </a><span class="pricered"><?php echo get_post_meta($post->ID, "price", true); ?></span></li>
                <?php endwhile; ?>            
  </ul>
_______________
非常抱歉。。。呵呵:loveliness:

火星人 发表于 2008-11-10 16:07

老马 客气了。。。

lanlanxin 发表于 2008-11-10 16:51

呵呵 我按<?php query_posts(array('post__in' => array(62,317,679,211,712))); ?>
你上面的调用出来是ID从855—836的日志标题  并不是我想要的了
是不是版本问题呢 还是 我的是2.5的

lanlanxin 发表于 2008-11-11 09:12

怎么还是不行 昨天又重新试验了下啊

马甲 发表于 2008-11-13 15:42

2.63下测试的。最近我很忙。不好意思

lanlanxin 发表于 2008-11-13 15:45

升级到2.63下正常了 谢谢

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.