• Greetings All,

    Step by step, I’m working on a custom theme for my wordpress install. Thus, I would like to shorten the output of the_title(); because the current output is ‘breaking’ my design layout.

    Is it possible to shorten the output to, for example, 75 characters?

    Cheers All

Viewing 1 replies (of 1 total)
  • This is one way of doing it:

    <?php if (strlen($post->post_title) > 75) {
    echo substr(the_title($before = ”, $after = ”, FALSE), 0, 75) . ‘…’; } else {
    the_title();
    } ?>

Viewing 1 replies (of 1 total)
  • The topic ‘How can I shorten the_title?’ is closed to new replies.