Content Maximum Character Limit
-
Hi there,
How can I set a character limit for the post content?
I tried:
{@echo substr(strip_tags($post->post_content), 0, 150);}
I also tried this in functions:
add_filter("the_content", "plugin_myContentFilter"); function plugin_myContentFilter($content) { // Take the existing content and return a subset of it return substr($content, 0, 150); }
…but it affects everything including the main blog posts.
My custom post type is called Case Studies
Do you have any suggestions please?
Many thanks
Warren
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Content Maximum Character Limit’ is closed to new replies.