correction

1 view
Skip to first unread message

Angel Utset

unread,
Sep 9, 2012, 12:08:08 PM9/9/12
to manchester-word...@googlegroups.com

Sorry, there was a mistake in the previous message.

The code is:

if (strlen(get_the_title($post->ID))<40)

                                               {wp_title('-', true, 'right'); bloginfo('name');}

                                               elseif (strlen(get_the_title($post->ID))>65) {

                                               $titulo = substr(get_the_title($post->ID), 0, 65);

                                               echo substr($titulo, 0, strrpos($titulo, " ")).'..'; }

                                               else

                                               echo get_the_title($post->ID);

in order to cut the title at the end of a word, rather than in the middle…

 

Again, the question is how important the title tag length is…

 

Angel

 

 

 

Reply all
Reply to author
Forward
0 new messages