Last active
May 1, 2018 01:53
-
-
Save cowgill/abb2fcb34d8248a75887f17825fd4b21 to your computer and use it in GitHub Desktop.
Highlight the Current Page In WordPress Using CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="leftsidebar"> | |
<ul> | |
<li <?php if( is_home() ) { echo 'class="current_page_item"'; } ?>> | |
<a href="/wordpress/">Home</a></li> | |
<?php wp_list_pages( 'title_li=&depth=1' );?> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment