Skip to content

Instantly share code, notes, and snippets.

@pigmentGit
Created November 27, 2014 07:48
Show Gist options
  • Save pigmentGit/ff5666bc4e830255387a to your computer and use it in GitHub Desktop.
Save pigmentGit/ff5666bc4e830255387a to your computer and use it in GitHub Desktop.
Bestämma maxlängd för the_title
<?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