1
同じ背景画像を使用している投稿のフィードを表示しています。私は重複したものを見つけて隠したいと思っています。同じ背景画像値を持つ要素を検出して削除する
FULL CODE:
<?php
$args=array(
'cat' => '1',
'post_status' => 'publish',
'post_type' => 'post',
'posts_per_page' => 10,
'taxonomy' => 'postkicker',
'term' => 'vote',
'orderby' => 'date',
'order' => 'DESC'
);
$my_query = new WP_Query($args);
if ($my_query->have_posts()) :
while ($my_query->have_posts()) : $my_query->the_post();
$src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), array(284,110), false, '' );
?>
<div class="divider-left">
<a class="img-thumbnew" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<div style="background-image: url(<?php echo $src[0]; ?>);"></div>
</a>
</div>
私の質問をフルコードで編集 –