Advertisement
Viper007Bond

Untitled

Oct 30th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. function plugin_myContentFilter($content) {
  2.     if (!is_single()) {
  3.         return substr($content, 0, 400) . ' <a class="more-link" href="' . esc_url( get_permalink() ) . '">Read more!</a>';
  4.     } else {
  5.         return $content;
  6.     }
  7. }
  8. add_filter("the_content", "plugin_myContentFilter");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement