這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

mPress Custom Feed Excerpts

描述

The mPress Custom Feed Excerpts plugin allows to you customize your WordPress feed excerpts by simply using the <!– more –> tag in WordPress.

Why?

Everyone who uses feeds in WordPress wants to be able to control what shows up for their readers. There is a fine line between an excerpt that is too short to capture interest and a full post that never brings your readers to your actual website. At the same time, WordPress strips out all the HTML on feed excerpts and none on full posts. Now, you can customize the feed excerpt on a post-by-post basis and maintain the HTML as seen by visitors on your site.

How?

Using this plugin is simple:

  1. Install the plugin
  2. Activate the plugin
  3. Go to ‘Reading’ under ‘Settings’ in the WordPress admin menu and make sure you are using the ‘Full text’ option for your feeds.
  4. Save your changes
  5. In your posts, just use the <!– more –> tag where you want to cut off the post in your feed.

Features

  • Works with custom post types
  • No settings page, just adds an easy way for you to customize your feed excerpts
  • Clean, well written code that won’t bog down your site

安裝

Prerequisites

If you don’t meet the below requirements, I highly recommend you upgrade your WordPress install or move to a web host
that supports a more recent version of PHP.

  • Requires WordPress version 3.2 or greater
  • Requires PHP version 5 or greater ( PHP version 5.2.4 is required to run WordPress version 3.2 )

The Easy Way

  1. In your WordPress admin, go to ‘Plugins’ and then click on ‘Add New’.
  2. In the search box, type in ‘mPress Custom Feed Excerpts’ and hit enter. This plugin should be the first and likely the only result.
  3. Click on the ‘Install’ link.
  4. Once installed, click the ‘Activate this plugin’ link.

The Hard Way

  1. Download the .zip file containing the plugin.
  2. Upload the file into your /wp-content/plugins/ directory and unzip
  3. Find the plugin in the WordPress admin on the ‘Plugins’ page and click ‘Activate’

Usage Instructions

Once the plugin is installed and activated, go to ‘Reading’, which is under ‘Settings’ in the WordPress admin menu. Make sure you are using the ‘Full text’ option for your WordPress feeds. Now, just use the <!–more–> tag in any post to create the cut-off point for the feed excerpt!

NOTE: To customize the link text, just add your text to the more tag, like this: <!–more My custom text…–>

Filters

All filters have access to the current post via the get_post() function.

  • mpress_custom_feed_excerpts_default_link_text – Filters the default link text. Single parameter is a string containing the default link text.
  • mpress_custom_feed_excerpts_continue_reading_link – Filters the entire link. Single parameter is a string containing the link markup.

常見問題

Installation Instructions

Prerequisites

If you don’t meet the below requirements, I highly recommend you upgrade your WordPress install or move to a web host
that supports a more recent version of PHP.

  • Requires WordPress version 3.2 or greater
  • Requires PHP version 5 or greater ( PHP version 5.2.4 is required to run WordPress version 3.2 )

The Easy Way

  1. In your WordPress admin, go to ‘Plugins’ and then click on ‘Add New’.
  2. In the search box, type in ‘mPress Custom Feed Excerpts’ and hit enter. This plugin should be the first and likely the only result.
  3. Click on the ‘Install’ link.
  4. Once installed, click the ‘Activate this plugin’ link.

The Hard Way

  1. Download the .zip file containing the plugin.
  2. Upload the file into your /wp-content/plugins/ directory and unzip
  3. Find the plugin in the WordPress admin on the ‘Plugins’ page and click ‘Activate’

Usage Instructions

Once the plugin is installed and activated, go to ‘Reading’, which is under ‘Settings’ in the WordPress admin menu. Make sure you are using the ‘Full text’ option for your WordPress feeds. Now, just use the <!–more–> tag in any post to create the cut-off point for the feed excerpt!

NOTE: To customize the link text, just add your text to the more tag, like this: <!–more My custom text…–>

Filters

All filters have access to the current post via the get_post() function.

  • mpress_custom_feed_excerpts_default_link_text – Filters the default link text. Single parameter is a string containing the default link text.
  • mpress_custom_feed_excerpts_continue_reading_link – Filters the entire link. Single parameter is a string containing the link markup.

評價

2018年4月5日
After a lot of Google searching on how to send emails from my feed with just the except I wanted, I found this plugin. I provided a great solution – especially after I read that I needed to include the “full”, (now excerpted), text in my email.
閱讀全部3個評價

貢獻者及開發者

“mPress Custom Feed Excerpts” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 mPress Custom Feed Excerpts 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.1

  • Tested in WordPress version 4.8
  • Simplified logic to rely more on WordPress core functions.
  • Added a mpress_custom_feed_excerpts_default_link_text filter for easily customizing the default link text.

1.0

  • Tested in WordPress version 4.5.2

0.3

  • Added the ability customize the link text.

0.2

  • Added a continue reading link

0.1

  • Initial commit