[WordPress] 外掛分享: Multiple Excerpt Lengths

首頁外掛目錄 › Multiple Excerpt Lengths
WordPress 外掛 Multiple Excerpt Lengths 的封面圖片
70+
安裝啟用
★★★★★
5/5 分(1 則評價)
2383 天前
最後更新
問題解決
WordPress 3.0.1+ v1.2 上架:2016-01-27

內容簡介

你在多個頁面上都有文章概要?你想讓它們的長度不同嗎?

透過「Multiple Excerpt Lengths」這個外掛,你現在可以控制出現在 WordPress 網站各種不同頁面模板上的文章概要的字數。

WordPress 預設文章概要長度為 55 個字。若要更改這個長度,只需要在 functions.php 檔案中加入簡短的程式碼即可。但是,一旦你加入這段程式碼,所有網站上的文章概要長度都會被更改,而你可能不希望如此。

例如,你可能希望在首頁上縮短文章概要的長度,因為在那裡你會以列的方式顯示最近的三篇文章,但你可能不想更改部落格頁面上文章概要的長度(因為可能在那裡會顯示最近十篇文章)。

有了這個外掛,你可以更改出現在網站各個不同位置的文章概要長度。預設情況下,外掛會將文章概要長度設為 55 個字。如果你想為特定的頁面/模板更改長度,只需為對應的頁面/模板指定一個數字即可。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Multiple Excerpt Lengths」→ 直接安裝(推薦)

原文外掛簡介

Do you have excerpts on multiple pages? Do you want to have them at different lengths?
With the Multiple Excerpt Lengths plugin, you can now control the length (in words) of excerpts present at various different templates throughout your WordPress site.
By default, WordPress sets the length of excerpts at 55 words. It is fairly simple to change this length – it only requires you to add a short piece of code to your functions.php file. However, once you add that code, it changes the length of ALL the excerpts present on your site, and you may not want that.
For example, you might want to shorten the length of the excerpts on your Front Page where you have 3 recent blog posts displayed horizontally in columns but you might not want to change the length of the excerpts on your Blog Page (which may be displaying 10 of your recent posts).
With this plugin, you’ll be able to change the length of excerpts present at various different locations throughout your site. By default, the plugin will keep the excerpts at 55 words. If you wish to change the length for a given page/template, you can do so by specifying a number for the appropriate page/template.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon