/ Published in: PHP
An example of how to write your own navigation with dynamic "active" classes.
Expand |
Embed | Plain Text
function custom_nav_menu() { ?> <ul id="tabs"> <li<?php if (is_home()) echo(' class="current_page_item"'); ?>><a href="<?php bloginfo('url'); ?>" rel="nofollow">home</a></li> <?php if (thesis_get_option('show_feed_link')) { $feed_title = get_bloginfo('name') . ' RSS Feed'; echo ' <li class="rss"><a href="' . thesis_feed_url() . '" title="' . $feed_title . '" rel="nofollow">' . thesis_feed_link_text() . '</a></li>' . "\n"; } ?> </ul> <?php } remove_action('thesis_hook_before_header', 'thesis_nav_menu'); add_action('thesis_hook_before_header', 'custom_nav_menu');
You need to login to post a comment.
