0

我认为我在下面使用的查询有问题。我想显示多个缩略图,每个缩略图都有自己的类似按钮。一切正常,但是当您按下 1 按钮时,它也会像所有其他图像一样。尝试了重置查询,但我想它不起作用或者我弄错了。有人遇到了类似的问题或知道如何解决这个问题?

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

1 回答 1

1

为like 按钮添加一个 fbml href 属性。

<a class="addthis_button_facebook_like" fb:like:layout="button_count" fb:like:href="<?php the_permalink(); ?>"></a>
于 2012-04-14T09:12:55.337 回答