Highlight current post title on a page
That’s easy: You should use $wp_query->current_post to retrieve the index of your custom query. In your case query will work something like this: <ul class=”post-list”> <?php $query = new WP_Query( array( ‘post_type’ => ‘campaign-post’ ) ); while ( $query->have_posts() ) : $query->the_post(); if($query->current_post == 0){ ?> <h1 class=”current”><?php the_title(); ?></h1> <?php } else{ ?> <h1 … Read more