Revision: 11280
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 30, 2009 00:13 by kristarella
Initial Code
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> <li<?php if (is_page('about-me')) echo(' class="current_page_item"'); ?>><a href="<?php bloginfo('url'); ?>/about/"<?php if (!is_home()) echo ' rel="nofollow"'; ?>>about</a></li> <li<?php if (is_page('contact-me')) echo(' class="current_page_item"'); ?>><a href="<?php bloginfo('url'); ?>/contact/"<?php if (!is_home()) echo ' rel="nofollow"'; ?>>contact</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');
Initial URL
http://diythemes.com/forums/thesis-customization-tips/2807-setting-nav-tab-order-thesis-1-3-3-a.html#post14551
Initial Description
An example of how to write your own navigation with dynamic "active" classes.
Initial Title
Nav menu for Thesis
Initial Tags
php, xhtml, navigation
Initial Language
PHP