# How can I add text to a single nav menu item?

I'm working on a theme that requires the end-user to specify the current performance season using a custom admin panel I've created, ie. "2013/2014", "2014/2015" etc., which I can retrieve using get_option('current_season');

On my custom nav menu I have a page titled "Season" that needs the aforementioned field inserted into it so it reads "2013/2014 Season" rather than just "Season".

The walker tutorials I have looked at only seem to show examples of adding a class to menu items but I need to add specific text to one menu item. How can I achieve this?

-

You can try the wp_nav_menu_objects filter. This seems to work, but not sure what other side-effects it may have, you'll want to test thoroughly.

function wpa_filter_nav_menu_objects( $items ){ foreach($items as $item ){ if( 'Season' ==$item->title ){
$item->title = get_option('current_season') . ' Season'; } } return$items;
}
$item_output .=$args->link_before . apply_filters( 'the_title', $item->title,$item->ID ) . \$args->link_after;