ids for pages and categories
-
Anyone know how to specify ids for links in the navigation bar that are generated through wp_list_pages and list_categories. I want to do this so I can make them highlight on the nav bar when that page is current as per the example at https://codex.www.ads-software.com/Dynamic_Menu_Highlighting.
Also can you tell me where exactly to put (where in the header.php?) the conditional statement?
<?php
if ( is_page(‘Page One’) ) { $current = ‘one’; }
elseif ( is_page(‘Page Two’) ) { $current = ‘two’; }
elseif ( is_page(‘Page Three’) ) { $current = ‘three’; }
elseif ( is_page(‘Page Four’) ) { $current = ‘four’; }
?>THANKS in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘ids for pages and categories’ is closed to new replies.