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
- Check if wp-login is current page
- How to get current page ID outside the loop?
- Stop WordPress Wrapping Images In A “P” Tag
- Contact Form on WordPress Sites?
- Page returns 404 with POST variables, but not without
- Custom templates not showing up in template dropdown
- Get page id by template
- Using pre_get_posts on true pages and static front pages
- How to get page title with the page ID?
- Show more than 20 items in pages or posts edit dashboard
- Allowing user to edit only certain pages
- How to display last 3 posts (recent posts) in a static page?
- How to give paged links custom title?
- How to set post slug when using wp_insert_post();?
- How to load javascript on custom page template?
- How to configure WordPress to handle 75,000 pages?
- How to update page status from publish to draft and draft to publish
- Check if is on child-page of a particular page
- Change page template programmatically ?
- Conditional tag to check if ‘page.php’ is being used?
- Customizing the URLs of WordPress Login and Sign-up Pages?
- How to disable posts and use pages only
- featured image as background image on pages
- Check IF is a “single product page” and Check the “role” for a Redirect
- A check for if is parent page, if has children, if has grandchildren
- How to load JS and CSS only on specific Pages using is_page()?
- Listing pages which uses specific template [duplicate]
- Proper way to get page content
- Access the same page from multiple urls (wildcard)
- Create a page without adding a page in the Database
- Is there a way to change the default page template selection?
- Can I have two child pages of different parents with the same name?
- Show Default Editor on Blog Page ( Administration Panel )
- remove tags from the_content
- Hide page visual editor if certain template is selected?
- Where to hook into post content?
- What is the difference between $paged and $page?
- multi page password protection
- Create a “Dummy” parent page for a hierarchy in page listing?
- How do I convert a page’s title to lower case?
- Get top level page parent title
- How to add a specific widget to only 1 page?
- Restrict admin access to certain pages for certain users
- page title, parent tilte and grand parent title
- How to add jQuery script to an individual page?
- WordPress page edit does not save selected template
- Add a Page without header and menus?
- What is an alternative to get_page_by_title()?
- Password protect page with multiple passwords
- Strategy for handling hierarchical pages with empty parent content
- Create pages automatically if they don’t exist
- Find empty pages or pages which have less than x characters
- Allow only new sub-pages to be created
- Set page template automatically based on parent
- Link section within page with slash (/) and not hash (#) without reloading the page
- Creating a template using a specific slug name, for a page with a parent page
- Can I display submenus in groups, using wp_list_pages?
- Is there a default template file for child pages / subpages?
- Get wp_get_attachment_url outside of loop
- Order by menu_order and title?
- Require title for pages
- WP Page and Subdirectory with same name
- Replace Dashes Before Title in Page List
- Add a new page to wordpress programmatically