WordPress by default display fill title if you code it using via the_title() function. You can reduced the number of character display by using following simple code.
<h1><a href="<?php echo get_permalink() ?>"> <?php $title_temp=the_title('','',false); if(strlen($title_temp) > 30) { $title_temp = substr($title_temp, 0, 30) . '...'; } echo $title_temp; ?></a></h1>
For example if you have space for 50 character in titles area of wordpress in your design. You can use this code to reduce the wordpress title display. The main attractive of this method is you can use only areas you needed.
How to use WordPress reduced titles in different areas of theme?
If you want do it on more programatic way or want use same type of titles in some other areas of the theme. I recommend using following method. First add this code to your function.php file in your theme.
function the_title_excerpt($before = '', $after = '', $echo = true, $length = false) { $title = get_the_title(); if ( $length && is_numeric($length) ) { $title = substr( $title, 0, $length ); } if ( strlen($title)> 0 ) { $title = apply_filters('the_title_excerpt', $before . $title . $after, $before, $after); if ( $echo ) echo $title; else return $title; } }
Then call it like this in your theme where you want display the title.
<?php the_title_excerpt('', '...', true, '50'); ?>