Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Making menu bar links shorter (http://forum.bytesforall.com/showthread.php?t=282)

gesman Feb 8, 2009 03:59 PM

Making menu bar links shorter
 
I have pages with long names.
They look ugly on menu bar.
Is there any way to create custom 'slugs' just for the menu bar (pages and categories)?

Gleb

Flynn Feb 8, 2009 08:46 PM

You can do that with custom fields, see http://forum.bytesforall.com/showthread.php?t=149 , the second half of post #7 (the upper part of post #7 is about something different)

gesman Feb 8, 2009 08:52 PM

The magic of custom fields, thanks!
(I'll re-copy for others)

In index.php, around line 97-99, change
PHP Code:

             } ?>"><?php 
        
the_title(); 
        if( !
is_single() AND !is_page() ) { ?>

to
PHP Code:

} ?>"><?php 
        
} if (is_page()) { echo get_post_meta($post->ID'long-title'TRUE); } else { the_title(); }
        if( !
is_single() AND !is_page() ) { ?>

Thanks!

PS: would be nice to have this a documented part of theme for both pages and categories.

Gleb


All times are GMT -6. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.