the_content( ); vs get_the_content(); The different is pretty simple actually. If you find yourself annoyed with formatting of the content, more specifically the added p-tags that WordPress puts into the content that you didn’t. Just use get_the_content(); and you will remove those tags.
Normally the get_the_content() tag returns the content WITHOUT formatting. Only the_content() will print the content WITH formatting.
echo apply_filters(‘the_content’, $post->post_content);
Related Posts:
- remove tags from the_content
- How is WordPress changing the content markup?
- Making a specific page wordpress compatable that is not index
- Single Loop With Dual Content Area
- Split Content and Gallery
- How can i display the content in plaintext
- Get ID of a page containing secondary loop in content
- the_content and wp_link_pages
- Add Incrementing ID to each paragraph in the_content
- Use the_content outside the loop
- get_the_content not working in loop?
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Content/Excerpt length control for a specific loop?
- Combining the_excerpt with the_content
- the_content() seems to block my ACF-code
- Removing the_content() from the page
- How to make post content from each post display within the same div
- Display content of page template (get_page)
- Loop after page content
- How to load all pages into one page with their templates
- Only display videos and images in the_content() within loop
- Styling text and images in the_content()
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Cannot retieve the_content() and the_author() – both returning empty strings
- Accessing the Posts page Content
- Using jQuery .after inside loop
- Announces with different formatting dependently on a number
- Insert content above an embedded video inside Wordress’ php the_content
- Excerpts not showing on main page
- Split Content and Gallery
- the_content() keeps repeating itself
- Echo Most Recent Sticky Post in Loop?
- to get a little more content after ‘read more’ inside loop
- how to use custom loop in the_content filter
- change the_content images for different sizes (Desktop, tablet, mobile)?
- Have multiple loops on a page appear after/between page content
- In Loop Output Place Custom Field Content In Between Paragraphs
- Help with add_filter(‘the_content’, ‘some_function’) and multiple matches
- How to add custom HTML markup and classes to the_content()?
- Hide old posts each year
- How to place comments_template(); outside the loop?
- Endless loop with wp_insert_post and wp_update_post
- How do I prevent one of two multiple loops from repeating on a second page?
- Hook into the loop via a plugin, and output something after every X post?
- Two custom loops, pagination, offset
- Access to Media Library
- Getting two wp_link_pages output
- How do you split multiple-column loop on category archive page?
- How to Loop within a Loop (Display Children and then Grandchildren)
- Run The Loop over array of post objects
- Enable infinite scroll on single.php [closed]
- How to loop through ALL pages?
- Does get_template_part pull data once in a loop?
- Get titles of all posts with current tags except current post
- How to retrieve “sticky” post outside the “loop”?
- Show a different post every 3 days [duplicate]
- Using get_the_excerpt() Before The Loop
- code suddenly appearing from my tempate second loop
- How to have a “clean” post content, for excerpt and social networks sharing
- wp_query inside the_loop
- How to go about combining dropdowns / filter queries?
- woocommerce get_price_html not pulling in correct price
- How to fix pagination for custom loops?
- WordPress Rewriting the DOM?
- How to display posts by vote count and if no value continue with latest posts with no votes?
- Sort results by groups of numbers and letters
- Display post list with different styles
- Loop for sticky posts
- Array ids post to function have_post
- Give each posts in a loop a number in sequence
- custom post on homepage
- get_comments with post_status ‘public’ retrieves NULL result
- I have broke my pagination, same posts on all pages (index.php)
- Filter existing hook using parameter and foreach loop
- Run “the loop” in a random order
- Search page loop banner image issue
- Getting selection of posts based on loop variables via Ajax
- Why would this code work locally but break online?
- Why would a completely normal loop give offset errors and maximum execution time errors?
- Avoid WP_Query’s duplicate posts with taxonomies
- Properly loop through and paginate page on each function call
- Why does my WP_Query pagination on a custom page.php only loads the homepage?
- WordPress finding posts on 404 page
- display post pdf attachments in side bar with link text
- Last post in loop when even
- Use the loop to check if DB record exists?
- Search – Check if post is a page on search page
- How can I make this iterative conditional within the Loop work via function?
- Show all child categories associated to post ID within loop
- Twitter bootstrap carousel multiple items in carousel
- Display all existing members
- Combine Query and Select Database to create directory loop
- My custom query not detecting the correct category
- wordpress showing all posts instead of date range
- ACF loops false value with repeater and checkbox
- How to do query_posts on tags pages
- Prevent duplicating specific column from database table
- wp_mail sending only once inside foreach loop
- How to use orderby on meta_value when using Pods custom database table storage
- How to set and retrieve cookies while in the loop