How to Add Excerpts to Your Pages in WordPress

Do you need to upload excerpts to your WordPress pages? By default, excerpts in WordPress are simplest to be had for posts. In this text, we can display you the way to upload excerpts to your pages in WordPress.

Why You May Want to Add Excerpts to Pages in WordPress?

WordPress comes with posts and pages as two default content material sorts. Posts are displayed in opposite chronological order (newest to oldest) to your weblog or homepage.

Pages however are stand by myself content material no longer revealed in a time particular order. They are most often used for one-off content material like your about us or touch web page.

Sometimes chances are you’ll want to show excerpts to your pages. Specially in case you have constructed a web site the usage of simplest pages.

Let’s check out how to upload excerpts to your pages in WordPress in addition to how to show the ones excerpts to your web site.

Adding Excerpts to Pages in WordPress

First you want to upload the next code to your theme’s purposes.php document or a site-specific plugin.

add_post_type_support( 'web page', 'excerpt' );

This code modifies the default WordPress content material sort ‘web page’ to upload give a boost to for excerpts.

You can head over to create a brand new web page or edit an present web page. Below the put up editor, it is possible for you to to see the excerpt meta field.

Excerpt metabox on the page edit screen in WordPress

Now you’ll use this excerpt meta field to upload customized excerpts to your pages in WordPress.

Displaying Excerpts for Pages in WordPress

There are many alternative tactics to show excerpts to your pages in WordPress. Depending on what you are attempting to do to your site, you’ll make a selection the process that most nearly fits your want.

Method 1: Display Recent Pages With Excerpts Using Shortcode

This manner permits you to create your personal customized queries and show contemporary pages the usage of a shortcode.

First you are going to want to set up and turn on the Display Posts Shortcode plugin. For extra main points, see our step-by-step information on how to set up a WordPress plugin.

Upon activation, you want to edit the put up, web page, or widget the place you need to show contemporary pages and upload the next shortcode.

[display-posts post_type="page" include_excerpt="true" excerpt_more="Continue Reading" excerpt_more_link="true"]

This shortcode will show the 10 contemporary pages with their identify, excerpt, and a proceed studying hyperlink.

If you didn’t input the customized excerpt for a web page, then it’ll mechanically generate the excerpt for the web page with the default period of 55 phrases.

Display page excerpts

If you might be the usage of the shortcode in a sidebar widget, then chances are you’ll want to permit shortcode give a boost to for textual content widget. Simply upload this code in your theme’s purposes.php document.

// Enable shortcodes in textual content widgets

Method 2: Display Page Excerpts in Sidebar Using Plugin

This manner permits you to simply show contemporary pages and their excerpts in your theme’s sidebar.

First you want to set up and turn on the Ultimate Posts Widget. For extra main points, see our step-by-step information on how to set up a WordPress plugin.

Upon activation, you want to consult with Appearance » Widgets web page and upload the Ultimate Posts Widget to a sidebar. First you want to supply a identify for the widget after which transfer to the Display tab.

Display excerpt for pages in widget

Next, you want to make a selection the ‘Show excerpt’ possibility after which transfer to the clear out tab.

On the clear out tab, make a selection ‘Page’ below the put up sorts segment after which click on at the save button to retailer your settings.

Select page as post type

You can now consult with your site to see the widget in motion.

Method 3: Display Page Excerpts Manually

Another approach to show web page excerpts is through including the code at once to your theme recordsdata. You can create a customized web page template and upload the next code as an start line.

$args = array(
'post_type' => array( 'web page' ),
'posts_per_page' => 10,
// The Query
$the_query = new WP_Query( $args );

// The Loop
if ( $the_query->have_posts() ) {
	whilst ( $the_query->have_posts() ) {
		echo '<h3>'. get_the_title() . '</h3>';
	/* Restore unique Post Data */
} else {
	// no posts discovered

You will want to alter the code to fit your theme templates.

That’s all, we are hoping this text helped you learn the way to upload excerpts to your pages in WordPress. You may additionally need to see our information on how to create customized WordPress layouts with Beaver Builder.

If you loved this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You too can in finding us on Twitter and Facebook.

Recent Articles

How to record screen on Mac running macOS Big Sur, Catalina and Mojave

Have you ever wondered how to record a screen on your Mac? Well, whether you want to record a video clip, document...

How to set Screen Time on Mac

Screen Time is a useful productivity tool that aims at controlling the time spent on your device. It mainly addresses the negative...

How to fix DNS server not responding on Windows

DNS servers play a crucial role in accessing any websites on the internet. You need to first access DNS server whenever you want...

The 4 Most Secure Phones for Privacy That You Can Buy

Before starting the article we would like to make it clear that no phone is 100% secure. But there are few companies...

The 10 Best Google Keep Extensions For Chrome And Firefox

Google Keep is an amazing service of Google that help you in making notes. It makes our daily life easy with its...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here