2012-04-14 25 views
0

我认为我下面使用的查询有问题。我想用自己喜欢的按钮来显示多个缩略图。所有的工作都很好,但是当你按下1按钮时,它也会像所有其他图像一样。尝试了重置查询,但我想这不起作用或者我错了。有人得到一个类似的问题,或知道如何解决这个问题?Facebook like button对所有帖子作出反应

 <?php query_posts('cat=1'); ?> 
     <?php if (have_posts()) : ?> 
     <?php while (have_posts()) : the_post(); ?> 
     <?php $thumb = get_post_meta($post->ID, 'thumb', $single = true); ?> 
      <ul> 
       <li> 
       <a href="<?php the_permalink() ?>" title="View <?php the_title(); ?>'s showcase"><img src="<?php echo $thumb; ?>" alt="View <?php the_title_attribute(); ?>'s showcase" width="150" height="111" /></a> 
        <div class="design"><a href="<?php the_permalink() ?>" title="View <?php the_title(); ?>'s showcase"><?php the_title(); ?></a></div> 
        <div class="subtitle"><a href="<?php the_permalink(); ?>">view feature</a></div> 
        <!-- AddThis Button BEGIN --> 
        <div class="addthis_toolbox addthis_default_style "> 
        <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> 
        </div> 
        <!-- AddThis Button END --> 
       </li> 
      </ul> 
     <?php endwhile; ?>  
     <?php else : ?>  
     <?php endif; ?> 
     <?php wp_reset_query() ?> 

回答

1

将fbml href属性添加到类似按钮。

<a class="addthis_button_facebook_like" fb:like:layout="button_count" fb:like:href="<?php the_permalink(); ?>"></a> 
+0

工程!感谢乔纳斯! – AKNL 2012-04-14 09:23:31