To disable auto excerpts in WordPress and control how excerpts are generated or displayed, you have a few options depending on where you want to make changes. Here’s a guide for different scenarios:

1. Disabling Auto Excerpts in the Theme

If you want to disable auto excerpts in your theme, you’ll need to modify the theme’s functions or template files. Here’s how:

Modify Theme Functions (Recommended Approach)

  1. Log In to WordPress Dashboard:
    • Go to www.yourwebsite.com/wp-admin and log in.
  2. Access Theme Editor:
    • Go to Appearance > Theme File Editor.
    • Be cautious when editing theme files directly; it’s a good practice to use a child theme or create a backup before making changes.
  3. Find and Edit functions.php:
    • Locate and select the functions.php file from the list of theme files.
  4. Add Custom Function:
    • Add the following code to disable automatic excerpts and use full content instead:
      php
      function disable_auto_excerpt($content) {
      if (is_home() || is_archive()) {
      return '';
      }
      return $content;
      }
      add_filter('get_the_excerpt', 'disable_auto_excerpt');
    • This code snippet disables excerpts on home and archive pages. Modify the conditional checks as needed.
  5. Save Changes:
    • Click Update File to save your changes.

Edit Template Files

Alternatively, you can modify your theme’s template files to change how excerpts are displayed. This method may vary depending on your theme:

  1. Locate Template Files:
    • Go to Appearance > Theme File Editor and find template files like index.php, archive.php, or content.php.
  2. Find and Replace Excerpt Code:
    • Look for code snippets that use the_excerpt() and replace them with the_content() to display full content instead:
      php
      // Replace this:
      the_excerpt();

      // With this:
      the_content();

  3. Save Changes:
    • Click Update File to save your changes.

2. Disable Excerpts Using a Plugin

If you prefer a plugin-based solution, you can use a plugin to manage excerpts:

  1. Install a Plugin:
    • Go to Plugins > Add New.
    • Search for a plugin like “Disable Excerpt” or “Advanced Excerpt”.
    • Install and activate the plugin.
  2. Configure Plugin Settings:
    • Follow the plugin’s settings to disable or customize excerpts.

3. Disable Excerpts in WordPress Admin Settings

In some cases, you can control excerpt behavior through WordPress settings or customizer options, but this is often limited to themes that provide these options.

  1. Check Theme Customizer:
    • Go to Appearance > Customize and look for settings related to excerpts or content display.
    • Modify the settings as needed.

Summary

  • Theme Functions: Use custom functions in functions.php to control or disable auto excerpts.
  • Template Files: Modify template files to replace the_excerpt() with the_content().
  • Plugins: Use a plugin to manage excerpt settings.
  • Theme Customizer: Check for excerpt settings in the theme customizer if available.

Sign In

Sign Up