You can make use of the_page_content()
outside the loop to display only the content of the page where the_page_content()
is supported by the following function
function the_page_content() {
global $post;
$content="";
if ( is_page() ) {
$content .= apply_filters( 'the_content', $post->post_content );
}
echo $content;
}
Inside the loop you can just use the_content();
Related Posts:
- Why isn’t is_page working when I put it in the functions.php file?
- Get the ID of the page a menu item links to?
- Disable visual editor on one specific page
- How can I programmatically create “child” pages on theme activation?
- How to display error messages using WP_Error class?
- Slugs as breadcrumbs for Pages
- Check if has any sidebar active on current page
- Remove Page Title from Static Frontpage
- Target a certain page within wordpress backend (admin) i.e. Pages > About
- Breadcrumb how i can display page title with parent > child title with permalink ? any Idea
- Pages should have priority when using add_rewrite_rule
- Enqueuing Script in functions.php vs on the page
- Programmatically set page template based on page ID
- Delete pages and Create default pages for all new network sites
- how to change link of some wordpress pages
- Make menu structure match page heirarchy on page parent change
- Change the slug of a particular page every x hours
- wp_insert_posts keeps adding multiple pages
- How to include local menu based on page id?
- Batch update menu_order attribute alphabetically
- is_account_page() change to page slug
- Don’t delete a page if it holds users
- List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?
- Display post shortcode content in the sidebar?
- Why is my page feed returning empty content?
- Function only on a specific page
- Functions For Calling Specific Elements
- Get page id or status by private pages?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- Enqueue script on every page except one
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- How do I register a new settings page? [closed]
- get content from page through AJAX
- How to assign php file(template) to several pages with same prefix page name/slug
- Remove the delete link from pages without a plugin
- Change is_front_page() to is_page() to display ‘hero’ on entire site?
- Define an extra field for all pages (with no plugin?)
- Custom field not updating via functions upon publishing
- Using array page name together with page id to deregister script
- How to add a class name to the ancestor of a post?
- How to add an excerpt and read more link to a page?
- My website is generating weired url parameters of paginated pages
- Order posts (across the whole site) by metadata date
- How to display random users with avatars
- Can the wp-plugins (Must Use Plugins) URL be targeted for use in functions.php?
- In a WordPress plugin, how do you output HTML code inside the DOM header? [closed]
- Different ‘WP_CONTENT_URL’ for different subsites in Multisite setup?
- Preferred Use of home_url()?
- Where does function_exists() look to decide whether a function exists? [closed]
- Get page slug and assign a variable within functions.php
- Make “sidebar template” the default template for new pages
- Refactor create_function
- Logic to Print/echo a css class only for 1st post and ignore all post after 1st? [closed]
- Attach parent category template to all subcategories
- How to insert a text in all pages and posts before or after specific places?
- Add class or ID to any WordPress function
- Remove Font-Awesome MaxCDN Link & Load Locally
- How to remove howdy dropdown menu content
- Change Admin Bar “Visit Site” URL
- exclude a category from a search on a specific page
- Stop turning small dashes into longer ones
- How to get specified parent page title in my function
- Execute function after a post has been published
- Last updated date function
- Possible to display shortcode based on the category?
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- How to set default archive image without overriding first attached image? [closed]
- Passing a variable via wp_head and then calling it on the page
- Load Woocommerce and WordPress Functions Outside
- How to make custom column Admin>Users sortable?
- How to know which ajax file or function is called for action
- How to filter $content in shortcode function
- watermarking gallery items
- Difficulty with PHP function that displays a post’s format in WordPress
- Change menu based on page template via functions.php
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Why is it so hard to add a class to the tag in the sidebar widget?
- Parent theme styles overriding child theme CSS [closed]
- Adding theme option values as custom body class
- How to add a new image size and apply it to posts only?
- What is the correct way to include my new functions and scripts in WordPress?
- Why is this function crashing my wordpress installation? [closed]
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- How to Override Page Template if URL matches query?
- Woocommerce Display Discount On cart
- ACF Date Form in Custom Admin Field
- WordPress undefined function error on using add_action() in functions.php
- How to create admin ajax function for my contact form
- how to display featured image for single post for a specific category
- Database Query not working
- save_post hook – headers already sent?
- How to use WP_rewrite?
- Wp get archive only text not link
- can not call functions in function.php
- Custom shortcode not being included in content paragraph [duplicate]
- Display post_meta-by_key on product catalogue
- What are the parameters are used in add_action and filters?
- Does functions.php apply to every page?
- Customizer cuistom CSS Priority ordre Issue
- WPDB query suddenly not working