Or even simpler:
echo wp_strip_all_tags( get_the_content() );
By using:
get_the_content()
Retrieve the post content. (Must be used in a Loop)
An important difference from
the_content()
is thatget_the_content()
does not pass the content through the ‘the_content
‘. This means thatget_the_content()
will not auto-embed videos or expand shortcodes, among other things.wp_strip_all_tags()
Properly strip all HTML tags including script and style.
Related Posts:
- Stop WordPress automatically adding tags to post content
- How to Create Editable Blocks of Text for the Homepage?
- How to hide the Text Area in the Post Edit screen
- How to remove images from showing in a post with the_content()?
- How to load a post into an empty div tag anywhere across the pages?
- Filter only the text in the_content
- wordpress post not showing my “” text>?
- Can I save part of the post in an external file and join it on the fly to avoid redundancy in the wp_posts table?
- WordPress post text starts newline after 93 characters
- Stop WordPress Wrapping Images In A “P” Tag
- How to Display a List of Users Who Have Made at Least 1 Post?
- Displaying the category name of a custom post type
- Most efficient way to insert a post outside WordPress?
- Display content from a specific category
- Delete posts from a post type automatically via Cron
- Template file for static posts page does not get loaded?
- Group Posts by First Letter of Title
- posts page – different lengths of excerpt
- Post X of Y in single.php / sidebar.php
- How can I get a list of latest posts outside of my WP install?
- WordPress Posts Out Of Order after 3.1 Update
- Paragraphs removed when using get_post_custom()?
- How to customize read more link
- First hook to use current page post id
- Post taxonomy from exif data
- Underscores.me retrieve next / previous post thumbnail in post_nav function
- How can a guest view the “Pending Review” Post?
- Adding a text link under the post title in the lists of posts
- Count to how many categories a post belongs to
- WP_Query: offset ignored when posts_per_page is -1?
- Create cron job without a plugin?
- Post Filter by Date and time
- WordPress version 3.8 – Preview button not working for editor
- Which URL to enter into browser to show all posts in archive.php?
- Using wp_list_categories like the the_category (showing just current categories of a post)
- add new post default view
- How to filter my search in post if contains a word in title, content or excerpt?
- Genesis + Ajax + Jquery | Failling to call action
- Need help with category listing!
- Random ajax load only works with posts_per_page set to -1
- Query posts and return XML
- A friend wants to make a comment on one of my articles, she has to be logged to wordpress?
- How to display only feautured/sticky listings on the homepage
- Shortcode to display the latest news article within a page
- How to make the first post in the loop be styled like a “new / featured” post?
- Adding a blog archive with pagination using WP_Query
- How to get Tags with specific post id
- Help diagnosing scheduled post problem with transition_post_status
- Archiving posts in wordpress
- User Selectable Delete of Pages
- Get post content with all filters applied, knowing post id
- query post limits
- is_page() and is_page_template() not being differentiated
- Post type no single page
- Get attachments only for this post
- How can I list posts by author?
- Add hero image to home page (blog format) via the dashboard
- Querying another post category to match current post and display in loop
- Having pages after specifying post_type post
- I want to show my post for limited time, how is it possible?
- Query function not executed between element [closed]
- Microformats in a single post – layout conflict
- Conditional css for custom post type
- Get author posts count after excluding a category
- How to add PHP code snippet to all Post pages?
- How Can I Always Display A Particular Post First Using WP_Query?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Different background colors for posts with WordPress
- I want to add another search box on posts page in dashboard
- How to preserve HTML from posts in RSS feed
- Menu does not foward to the linked posts
- WordPress Post ids big increment
- How to get post creation date?
- How to set the post permalink using the WordPress REST API?
- Multiple post in One Loop in wordpress
- Order posts inside bootstrap card columns
- Save ACF with a save button on a post
- Delete attached images from posts
- Unable to edit or post after enabling SSL
- How do I customize the post page
- Clicking on a Post takes 10+ seconds for the server to respond, Pages will respond immediately
- Schedule image post on download
- Show posts in a parent directory [duplicate]
- How can we print out total number of posts filtered by post type and category?
- WordPress infinite post cycle problem
- All my posts don’t show, only the headline is displayed on the homepage
- How to prevent people from seeing an attachment to a scheduled post that’s released in future?
- How can I access my posts on my wordpress site, now I’ve lost the domain name for it?
- Page not loading content – Body archive – page
- External link not showing on post but showing on comment
- standard wpGallery for post won’t work
- Why is $_POST Empty in Profile Edit Admin?
- How do i put a dropdown list of ALL my post in the sidebar menu?
- How remove “recent comments” title without modifying code? [closed]
- Return All Post from publish to draft [duplicate]
- Get posts after calculating meta key
- Articles show some of text [duplicate]
- How to make post stick to its own div
- How to monitor the first publish date?
- How to get post ID after removing that post?