Created
November 27, 2014 07:48
-
-
Save pigmentGit/ff5666bc4e830255387a to your computer and use it in GitHub Desktop.
Bestämma maxlängd för the_title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (strlen($post->post_title) > 25) { echo substr(the_title($before = '', $after = '', FALSE), 0, 25) . '...'; } else { the_title();} ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment