Well, as far I understood you want to remove all the HTML tags from the trimmed the_content. Right???
Try wp_filter_nohtml_kses function. Hope that’s going to work. Here is the full code-
<?php $trimmed = wp_filter_nohtml_kses( wp_trim_words( get_the_content(), 55, "" ) ); ?>
<?php echo $trimmed; ?>
Related Posts:
- How to auto-format code in Eclipse?
- Adding spaces in multiple lines simultaneously – in Pycharm
- can I add a custom format to the format option in the text panel?
- Change CSS/formatting on specific page, but not pages in general?
- How to change text size of Gutenberg editor
- Content over 10,000 characters won’t display with the_content()
- How to prevent automatic conversion of dashes to –
- Add dollar sign and commas to a number?
- Line breaks not showing up properly
- Use a language specific thousand separator
- Comment formatting with comment_content
- Formating the display of a post’s date, outside the Loop
- Formatting with
- How to define a custom font family for a wordpress blog that will not affect the entire site
- Keep formatting for tables copied from MS Word?
- Page formatting lost when I attempt a revision
- How to properly format if statement with html and php
- How can I prevent WordPress to wrap into a paragragraph
- Linebreaks behaving oddly inside blockquotes
- post_class() breaks out of formatting. . . extra markup also generated
- How to Prevent WordPress from Automatically Applying Inline Styles to Post Images?
- How do I format the date in Event Organizer?
- Images that copy code to clipboard when you click on them
- Formatting poetry in wordpress
- Changing the code format for wordpress
- How to remove filter apostrophe and single quotation
- Display KML (or other “raw data” file) nicely in WP?
- why doesnt my formatting work in my wisiwig editor?
- Formatting issues within Divi theme
- Preparing Hardcopy and Online Page
- how to display the web content which contain html code prolerly?
- Remove all paragraph tags
- How to prevent wordpress from autoformatting my posts once and for all?
- How do I display page content next to a contact form, rather than under it?
- Multiple item layout with one query
- Fix issue with displaced braces( )
- Formatting text in posts
- Is there a way to reorder a collection of posts to read from top (oldest) to bottom (newest)?
- How to add a spoiler without using shortcode-based plugins [closed]
- Can’t get blog entry to format properly using wp-load
- Paste Function Broken
- Moving formatted data in Salesforce rich text field into WordPress
- Change date format in a Java string
- std::string formatting like sprintf
- How can I remove punctuation from input text in Java?
- Easy pretty printing of floats?
- Convert a date format in PHP
- How to format a string as a telephone number in C#
- Switch between Visual and HTML tab freely
- Keep HTML format when switching from Visual to HTML editor
- Formatting Code Snippets on Free WordPress.com Account?
- disable WP automatically inserted line breaks after an image
- Create a formatted table-like menu
- Remove hidden formatting when user paste text from MS Word into TinyMCE
- Preserve white-space in Page
- WordPress adding tags into plugin content
- When calling wp_title(), do you have to create some kind of “title.php” file?
- Why does WP not like my container?
- Code Blocks with WYSIWYG in blog post
- Keep pasted pre formatted code as it is -with tabs- in visual editor
- $content = $post->post_content; with formating
- PHP echo stripping formatting in Advanced Custom Fields [closed]
- Inconsistent behavior from number_format
- Unwanted line break before
- Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?
- Format the Layout of Images In The Edit Post Textarea?
- Force Balance Tags not working
- Need to add trailing slash to all internal links relative and absolute
- Disable TinyMCE Table formatting width/height
- Visual/Text Editor displays blank pages in WP-Admin- but HTML on client side displays correctly
- return unformatted content in encosing shortcode
- Stop wordpress from adding html tags but not remove my own tags?
- How to amend time format of comments, using child-theme?
- What does the Global Variable $s represent?
- WordPress no longer holding post formatting
- Remove formatting in rich text with Gutenbergs Block editor
- Function sanitize_title() does not appear to be working
- Editing the formatting.php file vs functions.php file?
- Calling PHP Titles inside Javascript Markup
- WordPress menu>Custom Link: removing my link formatting and adding %20
- How to use numbered lists in the post editor?
- Formatting error with source code on WordPress.com?
- CSS appears to not work on any WordPress theme
- How to add custom HTML tags in the visual mode via keyboard only?
- How can I change the date format of the revision list?
- Object of class WP_Error could not be converted to string in /formatting.php
- How to completely prevent WordPress from destroying/modifying my shortcode outputs?
- My custom theme text and content format
- How to paste source code from IDE to posts directly?
- echo wp_editor to screen with formatting
- WordPress options text format
- E-Commerce Products Page Sidebar Formatting
- WordPress removes paragraphs. How to disable this behavior?
- Generating a number based on post ID
- How to display html code normally?
- Show Title/Date/Excerpt of first post & only Title for rest in Query [duplicate]
- Full Width Container Colour Problems
- Decimal stripped from metabox number
- Adding padding above menu
- How to Convert Parent Page’s URL in Singular Name format when Child page is open