Untested. But try: <?php echo apply_filters( 'the_content', limit_text( get_the_content(), 15 ) ); ?>
15 is for char limit or word limit? If words, using strlen is incorrect.
Try using WP wp_trim_words()
instead.
Related Posts:
- Where to put my code: plugin or functions.php?
- Custom Post Type Data in Sidebar widgets?
- Including Custom Post Types in “Recent Posts” Widget
- Limit widget to a specific registered sidebar
- Include custom post types in categories widget
- Including a custom post type in the Archives widget
- How to embed form data within the ‘Add new post’
- Add custom post types stats to a custom dashboard widget
- How to create another version of the Category widget?
- ‘Pages’ widget alternative for custom post types?
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- right_now_content_table_end function not working?
- Custom Post Type Loop throws 500 error when used in widget
- How to create Blog Post Specific Widget
- Custom page sidebar using Template dropdown box
- Random image from tag/custom type on sidebar
- Register widget only page is a singular of custom post type
- Widget: Custom Post Type Post Listing Dropdown on Admin Side
- Display Custom Toxonomy In WordPress and theme Widgets category selection dropdown list
- Custom Widget WP_Query problem
- Hide a widget inside a div on specific type of post
- Filter widget outputs
- Set Custom Post Type in Widget Settings for use in Widget
- Want to be able to sign up subscribers as authors
- the_post_thumbnail call removing li in code
- how to set a WP Plugin’s url
- Why isn’t a list of posts from my custom post type displaying in this widget?
- How to get dropdown instance value in WordPress custom Widget
- Post Query not working
- Methods for development wordpress themes [closed]
- display custom post type in widget aera
- How to exclude categories from a sidebar with active widgets in it?
- Replace Content of Sidebar on Custom Post Type
- Custom Page Template – Widgets of wrong sidebar
- Widget area for individual posts (custom post type)?
- How do I get the posts from single page custom post type from a sidebar to display in a page?
- I want to link an author to everything from any post type that they publish on the website
- retrieve custom post image through widget
- Custom post type not being pulled in widget
- Custom post types archive
- multiple custom post type category selection search
- how to override menu widget?
- Displaying database table in backend of wordpress
- Filter CPT based on meta box value using Flexible Posts widget?
- Creating Multiple Admin Widget Page with Calling One Sidebar
- fetch meta fields inside a widget
- Radom post image/link based on custom taxonomy
- empty dashboard for custom role
- Code in custom widget queries all posts, when it should only query the current post
- How to add post type in masonry posts elementory widget
- Post_type doesn’t work for widgets?
- How to display custom message for (Genesis) featured posts if no posts
- Highlight menu item when on a custom post type?
- Post slug changed using code doesn’t reflect on editor when post is published
- Detect meta value changes when post is updated (post_updated)
- Remove Custom Post Type menu for non-administrator users.
- Using Query Posts With Multiple Post Types And A Taxonomy
- Display Custom Post Type in divs just thumb and title
- Custom Taxonomy List links being re-written
- How to show particular category all post in custom single file
- Associate Taxonomies Across Post Types
- Changing ‘view’ link for custom post type on list post screen?
- Fetch ID’s associated with a custom post type when translated with WPML?
- Custom post type show on both Home and Date Archive
- Create custom PAGE with register_post_type
- Update CPT post meta with update_post_meta and cron job
- Can’t query tag and post_type at the same time
- Moving ‘register_post_type’ to seperate file not working
- Checking if Post Title is Unique as Loop Criteria
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Versioned Custom Post Type (Not the same as revisions)
- Display Woocommerce Orders for specific author [closed]
- What’s the equivalent of Hide From Menus on MODX on WordPress?
- Lost of query parameter when using permalink
- Custom Posts values in custom post overview
- Displaying multiple post types on home page
- Query to get child pages of current page and display it in action hook
- Make a custom column sortable by a value from a different custom post type
- Custom post type returns bad post ID
- Custom Post Types,Permalink and Heirarchy
- Send post changes to set email addresses (not users or subscribers)
- Preventing Truncation of First Post
- how to compare different timestamps in wp-query for events custom post types?
- Filter custom post type admin list by custom meta column, where the column is another custom posts meta value
- In child theme, add CPT to custom taxonomy registered in parent theme
- Custom taxonomies not displaying in some custom posts
- From CPT Custom Loop into Shortcode?
- Custom taxonomy terms registered not showing when added in child theme
- How to assign post to category
- WordPress deletes custom posts instead of trash them
- Creating custom post type relationships
- Display all Custom taxonomy terms and their relevant custom posts
- wordpress query_posts with foundation 6 Accordion not working correctly
- Allow viewing the edit screen for a post type, but not make/save/publish/update changes
- Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?
- adding a shortcode into a custom post type
- Custom Post within a custom post
- Custom My account page and custom page for editing posts
- show custom post types for a month
- wordpress custom post type shows other cpt posts in admin menu