2012-04-14 15 views
0

Ich denke, etwas stimmt nicht mit meiner Abfrage, die ich unten verwende. Ich möchte mehrere Thumbnails mit jedem eigenen Like-Button anzeigen. Alles funktioniert gut, aber wenn Sie 1 Taste drücken, wird es auch alle anderen Bilder mögen. Ich habe die Reset-Abfrage versucht, aber ich denke, es funktioniert nicht oder ich habe etwas falsch gemacht. Jemand hat ein ähnliches Problem oder weiß, wie man das beheben kann?Facebook Like Button reagiert auf alle Beiträge

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

Antwort

1

Fügen Sie der Schaltfläche "Like" ein fbml href-Attribut hinzu.

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

Funktioniert! Danke Jonas! – AKNL

Verwandte Themen