the_content
does echo the content. That is stated in the Codex– “Displays the contents of the current post”, emphasis mine. Use get_the_content
instead, to return a string that you can manipulate.
Be aware that get_the_content
does not run all of the same filter as the_content
. Again from the Codex:
If you use plugins that filter content (
add_filter('the_content')
),
then this will not apply the filters, unless you call it this way
(usingapply_filters
):<?php apply_filters('the_content',get_the_content( $more_link_text,> $stripteaser, $more_file )) ?>
Related Posts:
- What is the proper way to get contents of a page?
- Get the Page Content,without generating HTML
- Add infinite scroll to content splitted post
- Get the content of a specific page (by ID)
- How can I keep the content of my pages version controlled?
- Get content from one page and show it on another page
- What methods to use to create small, editable pieces of text for static pages?
- Editing Complex Pages in Visual Mode
- Multiple areas of dynamic content in a page
- Static files or dynamic WP pages for “static content”?
- The entire content of my WordPress page has disappeared
- Why content_arr[‘extended’] removes paragraph tags?
- Page displays content from different query?
- Having wordpress page accesss issue under sub-directory
- How to make my category archive behave like a page
- The concept of non-blog content
- how to display sidebar on pages in wordpress
- the_content of template page
- If I use a static page-slug.php for a page, is the database still queried?
- Use content from one page in another template
- How To Render Shortcode In AJAX Response?
- the_content() Not Grabbing All Content
- append one page content into another
- Two different pages that share the same content?
- upgrade has caused page content to disappear
- My edits are not saved
- Add the same content to multiple pages
- Cannot pull WYSIWYG content
- Editing pages from dashboard
- What’s the best way to manage sections on a page?
- include exception inside theme for empty widget area
- How to get sort content by page id?
- Making a specific page wordpress compatable that is not index
- the_content() Returns post content when I want page content
- Add text to the bottom of particular pages
- how to print the content of pages inside the front end area
- Create a page without adding a page in the Database
- remove tags from the_content
- What is an alternative to get_page_by_title()?
- Require title for pages
- Add a new page to wordpress programmatically
- Get Permalink for the top level parent of child pages
- Get page id by title?
- List all pages and children in separate ul
- Dynamically Load Styles and Scripts from Theme Functions.php
- How do I load custom scripts and styles for a page?
- How should I best incorporate WordPress in my static website?
- WP won’t save changes in post (any)
- Call the content of a page in AJAX in WordPress
- Registering multiple sidebars with data from an array
- How to dynamically save a selected option from page “Templates” selectbox?
- Extra title output with this function wp_list_pages
- Dynamically change page that loads
- Page title not showing up
- Where is the key _wp_page_template passed?
- remove/hide pages from users backend
- How to have a “clean” post content, for excerpt and social networks sharing
- Related Links Page with moderated, user suggested link submissions
- Missing Page, But Still Exists In Preview
- How to create a page that lists all the experts(Users with same access permission as author)?
- Adding Author and Updated Schema Markup to WordPress Static Pages
- Trying to Edit a Page but it sends me to a Product Edit page
- How do I find PHP file that contains content of my page?
- My custom template page not loading content inside it?
- How to edit a HTML list in WordPress?
- Is it possible to activate page template without manually selecting it in wp-admin?
- Excerpt Now Showing on the Post Page
- All Pages visible on the Frontpage
- How do we exclude multiple pages (like opposite of is_page)
- Create page template with some static contents
- Link to Particular Page Within Template PHP Code
- Can I schedule my site to launch at a set time and date?
- Using page-something.php as static front page
- Get all children titles of a page as a link to them
- custom page templating in WordPress
- WordPress – Retrieve a Page if it’s a direct descendant of another Page
- After creating a new page, filling the page with structure
- Identify that a page is a grandchild page
- Suggestions: Customizable header image and style colors that are different for each page
- Page Slug Won’t Change – Can’t Edit Archive Page With Slug or Reassign Slug
- accessing the Admin page
- Cover block always has margin
- When I enter password, I’m redirected to the WordPress login form
- How do I add a new item to this menu on the Add New Page section?
- how to change permalink for dynamic page without 404 error
- Page and admin doesnt load – i tried everything
- Problem with deleting a “Page”
- Display different pages based on form entry
- Adding styles/scripts to specific page
- Removing add new pages form editor role
- Maximum number of characters in a wordpress page?
- Hidden Pages, Posts & Plugins
- Multiple pages to show posts
- How to finish this loop?
- Page can not be updated and disappeared in “show all page”
- All the pages are blank [closed]
- Approve Page Edits
- Woocommerce – Making product pages child of shop
- appearance of new page
- How to read a page’s “Shortcodes” from the Template File?