Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter("the_content", "plugin_myContentFilter");
- function plugin_myContentFilter($content) {
- $post_type = get_post_type($post_id);
- if ( $post_type == 'ideas') {
- // Take the existing content and return a subset of it
- //return wp_trim_words( $content, 600, NULL );
- return substr($content, 0, 3000);
- } else {
- return $content;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement