Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function content($limit) {
- $content = explode(' ', get_the_content(), $limit);
- if (count($content) >= $limit) {
- array_pop($content);
- $content = implode(" ", $content) . '...';
- } else {
- $content = implode(" ", $content);
- }
- $content = preg_replace('/\[.+\]/', '', $content);
- $content = apply_filters('the_content', $content);
- $content = str_replace(']]>', ']]>', $content);
- $wpgcontent = wp_strip_all_tags($content, $remove_breaks);
- return $wpgcontent;
- }
Add Comment
Please, Sign In to add comment