Site icon O'Brien Media Website Design & Support

How to add an “Excerpt” field to pages in WordPress

To add an “Excerpt” field to pages in WordPress, follow these step-by-step instructions:

Step 1: Log in to your WordPress Admin Dashboard

  1. Go to your WordPress website’s login page, typically found at example.com/wp-admin. Replacing example.com with your domain name.
  2. Enter your username and password to log in.

Step 2: Enable Excerpts for Pages

By default, WordPress doesn’t display the excerpt field on pages, but you can enable it.

  1. Go to Pages:
    • In the WordPress admin dashboard, on the left-hand side menu, click on Pages.
  2. Edit a Page:
    • Open any existing page for which you want to enable the excerpt field by clicking on the page title, or create a new page by clicking Add New.
  3. Show Excerpt Option:
    • In the page editor, at the top right of the screen, click on the Screen Options tab. This will open a dropdown of available options.
    • In the dropdown, check the box next to Excerpt. This will enable the excerpt field to appear in the editor.

Step 3: Add Your Excerpt

  1. Scroll down on the page editor, and you should now see a new field called Excerpt.
  2. In the Excerpt field, write a short summary or description of the page’s content. This excerpt can be used in themes or plugins to display a custom summary for pages.

Step 4: Save Your Changes

  1. Once you’ve added your excerpt, scroll back up and click Update (or Publish, if it’s a new page) to save your changes.

Step 5: Customize Display (Optional)

If your theme or widgets don’t automatically show the excerpt, you may need to customize the theme or use a plugin to display the excerpt on pages. Here’s how:

  1. Check if the Theme Supports Excerpts for Pages: Some themes only display excerpts on posts, not pages. If this is the case, you may need to modify your theme files to display excerpts for pages.
  2. Use a Plugin:
    • If modifying the theme isn’t ideal, you can use a plugin such as Advanced Excerpt to customize how and where the excerpts are shown across your site.

Step 6: Display Excerpts Using Code (Optional)

If you’re comfortable editing your theme files, you can modify how pages display the excerpt by editing the relevant .php files in your theme.

  1. Access your theme files:
    • Go to Appearance > Theme File Editor or use an FTP client to access your theme files.
  2. Modify the Template:
    • Locate the template file responsible for displaying pages (typically page.php or content-page.php).
    • Add the following PHP code where you want the excerpt to display:
    • <?php the_excerpt(); ?>
    • Save the changes.

Step 7: Clear Cache (If Applicable)

If you have a caching plugin installed, make sure to clear the cache so your changes are reflected immediately.

That’s it! You’ve now added and enabled the excerpt field for pages in WordPress.

Exit mobile version