WordPress CSS based on page title (Conditional)


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <a href="/" class="<?php if (is_page('Archives')) { ?>selected<?php } ?>">Archive</a>

URL: http://codex.wordpress.org/Dynamic_Menu_Highlighting http://codex.wordpress.org/Conditional_Tags

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.