In this short example you will learn how to add a custom excerpt to WordPress pages. If you can copy and paste text and know how to work your website’s file manager or FTP, you will be able to implement this code into your WordPress website.

How To Add Custom Code To Your WordPress Website

  1. Connect to your WordPress website using FTP (You may try out FileZilla for free).
  2. Once you have connected via FTP, navigate to your WordPress installation.
  3.  Open your theme’s functions.php file with your text editor of choice. This can be found under wp-content > themes > {YOUR ACTIVE CHILD THEME}.
  4. Copy the code below from line 5 onwards and paste it into your functions.php file (right at the bottom).
  5. Once this is done save your changes and ensure you overwrite the changes.

This will add an excerpt option underneath screen options (found at the top right of the edit page screen) , once selected a meta box will be available below the page content editor.

Photo by Brandon Morgan on Unsplash