Highlight current post – Advanced Custom Fields
-
I am using advanced custom fields, and the following code (see below) to display the last 5 posts, but need to change the link color of the current post you are viewing. Would appreciate any help (site is not live or I would post link).
<div class="leftbar"> <h3><a href="/blog"><img src="/wp-content/themes/ts/resources/up-arrow.gif" border="0" style="float:left; margin: 3px 5px 0 0;">T&S Blog Overview</a></h3> <?php $queryObject = new WP_Query( 'post_type=blog&posts_per_page=5' ); // The Loop! if ($queryObject->have_posts()) { ?> <ul> <?php while ($queryObject->have_posts()) { $queryObject->the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php } ?> </ul> <?php } ?> </div><!-- end leftbar -->
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Highlight current post – Advanced Custom Fields’ is closed to new replies.