最佳WordPress摘录长度及相关插件插图

If you are a WordPress user, you already know that themes and the WordPress core automate many of the functions that determine how content is displayed. A common example is how a page displays a summary of an article. But did you know that you can customize the length of the WordPress feed? This tutorial will explain how to do this! What is the summary in

  • WordPress?
  • How do I change the summary length?
    • manually change WordPress feed length
    • use plug-ins to change WordPress feed length

WordPress? The

feed is part of a post that links to the entire article. It is used to attract readers and make them want to read further. It helps to highlight the key points of the content because sometimes the title is not enough to attract the attention of the audience.

by default, WordPress limits the summary to the first 55 words of the article. When

uses the classic WordPress editor, you can automatically add the summary to your content by pressing the “read more” button. It addstags to the HTML, which can be seen in the HTML editor. You can also enter custom messages, such as.

最佳WordPress摘录长度及相关插件插图1

or you can change its length as needed. Providing more text can attract readers’ attention to the article.

has different ways to accomplish this task. You will find instructions below to guide you through the process. How does

change the summary length? The two most common ways for

to change the summary length are either manually or by using the WordPress plug-in.

manually changing the WordPress feed length the

manual method involves adjusting the code. However, you do not need to have any in-depth knowledge of the programming language to do this.

here are the steps to manually change the length of the summary:

1. Hover over the appearance tab and select the theme editor.

2. Open the functions.php file and insert the code:

function my_excerpt_length ($length) {
Return 80
}
Add_filter ('excerpt_length',' my_excerpt_length');

3. Change the word limit from 80 to any number you like, and then press the Update File button.

for some topics, you also need to edit the content.php file. Please follow these guidelines:

1. While still in Theme Editor, scroll down until you find template-parts. Under this heading, click the content.php file.

2. Search line:

<?php

adds the following code snippet under them:

if (is_home (), is_category (), is_archive ()) {
The_excerpt ('')
} else {

3. Find statements:

?>

and then insert the following line above them:

} // end of if statements

4. 0. Click Update File and you are done! The end result of the

will be as follows:

最佳WordPress摘录长度及相关插件插图2

uses the plug-in to change the WordPress feed length. One of the easiest ways to customize the feed length for

is to change it using the plug-in. The recommended option for this task is the Advanced Excerpt plug-in. It is free and easy to use.

by using this plug-in, you can:

  • prune the summary by number of words or characters.
  • adds and customizes the “read more” link.
  • completes the last word of the summary so that it does not end halfway.
  • retains HTML tags and chooses which tags will be included.

to install it, hover your mouse over the plug-in on the WordPress dashboard and press install plug-in. Enter “Advanced Excerpt” in the keyword bar. Click the install now button, and then enable it. To use the plug-in for

最佳WordPress摘录长度及相关插件插图3

, follow these guidelines:

1. Go to the plug-in tab and press the settings under the plug-in.最佳WordPress摘录长度及相关插件插图4

2. Customize the available options according to your preferences.最佳WordPress摘录长度及相关插件插图5

3. Click the Save changes button.

Summary one of the main points that

helps to arouse readers’ curiosity about the article is the abstract. When using WordPress, you can change the default feed length in two ways:

  1. Manual-inserts the code into the theme’s function.php file.
  2. Use plug-ins-install the Advanced Excerpt plug-in and configure its settings.
Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.