1
我正在创建一个新闻中心,其中包含指定类别的最新wordpress帖子。它包括帖子图片和标题。该div组有一个悬停动画,我希望这个类,当点击时,链接到它的拉动标题和图像的帖子。将div组链接到选定的永久链接?
目前它只链接,如果你点击标题本身,我希望能够点击整个块,并链接到帖子。有任何想法吗?这里是代码,因为它代表...
<?php query_posts('cat=1 &posts_per_page=1'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="block-1">
<div class="news-center-overlay transition">
<p>VIEW FULL STORY</p>
<div id="news-line-box">
<div id="part-1"></div><div id="part-2"><img src="<?php echo get_stylesheet_directory_uri()?>/img/star.png"/> </div><div id="part-3"></div>
</div>
<h4>COMETS BASKETBALL</h4>
</div>
<a href="<?php the_permalink() ?>"><?php echo get_the_post_thumbnail($post_id, $size, $attr); ?></a>
<p class="news-center-title animation"><a href="<?php the_permalink() ?>"><?php echo get_the_title($ID); ?></a></p>
</div>
<?php endwhile; endif; ?>