I can't change my current link color. If I click one of my link, then it will go to the specified URL, but the color of the current link that opened is not change. Still showing the same color as the other links that were not active.
My website is http://lineswork.com/beta/architecture
You can try to click on the right links, V2 and dragofly. The page change but the color is not change. Please kindly help me.
Thanks.
Add a class, for example selected
, to the link and try this CSS style.
.selected{
color: #a0160d;
}
Put <?php $current_id = $post->ID; ?>
outside the loop.
Then, change your code
<div id="architecture-wrap-right">
<?php //get post type ==> architecture query_posts(array( 'post_type'=>'architecture', 'posts_per_page' => 10, 'paged'=>$paged )); ?>
<div class="architecture-item-details"> <div class="architecture-title">
<a <?php if ( $current_id == $post->ID ) echo 'class="selected"'; ?> href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php echo the_title(); ?></a>
</div> </div> </div>