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 Set Different Wallpapers On Multiple Screens On MAC

Does this question pop in your head when you think of setting up multiple screens on MAC? If so, the next few...

5 Must-Have Android Apps for 2020

The digitization of most of the amenities of society was a breakaway from the traditional livelihood of the masses.

How To Rearrange Comments in WordPress

Rearranging feedback to show the newest one on most sensible is changing into a brand new development that an increasing number of most sensible...

How to Highlight Author’s Comments in WordPress

On maximum websites, it is rather arduous for customers to observe creator’s feedback. This is why many WordPress websites spotlight their creator’s remark by...

How to Add Categories and Subcategories to WordPress

WordPress comes with the facility to kind your content material into classes, tags, and taxonomies. One of the most important distinction between classes and...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here