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
- Change date format in a Java string
- How can I remove punctuation from input text in Java?
- Format JavaScript date as yyyy-mm-dd
- Easy pretty printing of floats?
- Convert a date format in PHP
- Switch between Visual and HTML tab freely
- Keep HTML format when switching from Visual to HTML editor
- disable WP automatically inserted line breaks after an image
- Create a formatted table-like menu
- Updating to Version 4.5 bumped my “main sidebar” widget out of place
- WordPress adding tags into plugin content
- Automatically added brs and paragraphs?
- When calling wp_title(), do you have to create some kind of “title.php” file?
- PHP library that can merge stylesheet with inline style [closed]
- Code Blocks with WYSIWYG in blog post
- WordPress | Convert #038; to &
- How to Include HTML in Excerpts?
- PHP echo stripping formatting in Advanced Custom Fields [closed]
- Inconsistent behavior from number_format
- Crafting WP_Query array, sort by date
- Format the Layout of Images In The Edit Post Textarea?
- Force Balance Tags not working
- Remove add to cart icon/view product button woocommerce
- 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
- How can I add custom text styles to the visual text editor?
- Exclude uploaded files from appearing in the excerpt()
- WordPress get_the_content losing formatting when emailed
- Special Formatting for WordPress Plugin Description?
- HTML tables in content areas
- Displaying Meta-Box Data Properly
- WP Editor: Keep Bold, Underline, etc. but ignore color
- Using Microsift Word/Outlook for content publishing to WordPress
- Pasting formatted text from MS-Word
- All images on one line for each post
- Style wordpress image captions in RSS
- Snippet to Format Elementor Text Box Throws Error
- Email sent from WordPress has HTML tags
- Measure time in ONLY HOUR format
- Is there an easy way to remove the data-preserver-spaces span from blocks?
- Mystery line break
- get_the_term_list( get_the_ID() label formatting?
- Changing Date Format on Custom Meta Data w/shortcode call
- How do I change the content of an element for a theme without losing the styling?
- Understanding automatic text formatting in the WordPress editor
- Paste from word not preserving formatting
- Post formatting bug in WordPress
- How to format the various types of custom fields?
- Reformat data within a nested array
- Theme does not respect spaces between paragraphs in pages
- the_content inside my own theme does not retain line breaks / enters like in the admin
- ACF loop and php formatting
- WordPress excerpt with formatting and allowing selected tags
- getpost content with all formatting for admin pages
- Custom formatting
- Date is showing in unreadable format. How to convert to readable date?
- How to show only text from post in WordPress
- How can I add the option to format to list in RichTextToolbarButton?