Take the 2-minute tour ×  So I've got a list of posts on the
right side of a page. I'm trying to make it so that when you're
looking at one of the posts the corresponding link (on the right
side of the page) is selected (just like when you're on a page,
and that menu item in the nav is highlighted). Make sense?  I'm
trying to use this "if" statement to add the class "selected-
highlight"  <div class="service-highlight-box-sidebar <?php
if(single_post_title() == the_title()){ echo ' selected-
highlight'; } ?>">         <?php the_title(); ?>    if (
has_post_thumbnail() ) {  ?>  the_content(' ');   When I load
the page it adds <div class="service-highlight-box-sidebar
post_title the_title selected-highlight"> to every one of the
post links on the right of the screen. Note: it doesn't actually
add "post_title" and "the_title", it'll add the dynamic post
title and dynamic link title in their place. The problem is that
it's adding them to the class instead of using them in the if
statement to determine weather the c