2012-04-14 12 views
0

私は以下を使用している私のクエリで何か問題があると思います。ボタンのように複数のサムネイルをそれぞれ表示したいすべて正常に動作しますが、1ボタンを押すと他のすべての画像も同様に表示されます。リセットクエリを試しましたが、動作していないか、間違っています。誰かが擬似的な問題を抱えているか、これを修正する方法を知っていますか?Facebookのようなボタンはすべての投稿に反応します

 <?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

Works!ありがとうジョナス! – AKNL

関連する問題