前言介紹
- 這款 WordPress 外掛「List category posts」是 2008-08-15 上架。
- 目前有 90000 個安裝啟用數。
- 上一次更新是 2024-12-18,距離現在已有 137 天。
- 外掛最低要求 WordPress 3.3 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 253 人給過評分。
- 論壇上目前有 4 個提問,問題解答率 0%
外掛協作開發者
zymeth25 | fernandobt |
外掛標籤
cms | list | posts | categories |
內容簡介
List Category Posts 可以讓你透過使用 [catlist] 短碼在文章或頁面中按類別列出文章。在編輯頁面或文章時,直接插入短碼到文章中,文章就會被列出來。基本的使用方式如下:
[catlist id=1]
[catlist name="news"]
短碼可以接受分類名稱或 ID,你可以設定文章的排列順序和要顯示的文章數量。你也可以顯示文章作者、日期、擷取文字、自訂欄位值,甚至是內容!許多參數已被加入以客製化顯示方式和內容。詳細的文件可以參考完整的說明以瞭解不同的使用方式。
使用者可以在每個文章或頁面中使用不同參數的 [catlist] 短碼。
插件的設定頁只有一個選項,目前只支援一個全域選項,也就是 numberposts 參數,用來預設每個實例所要顯示的文章數量(你可以透過在短碼中使用 numberposts 參數,來覆寫這個值)
如果你希望列出分類,而非文章,請使用我的另一個外掛 List categories。
客製化
你可以使用 CSS 自訂不同元素的樣式。你可以定義要用來包含該元素的 HTML 標籤,並且為這個標籤指定 CSS 類別。詳細的使用方式可以參考文件。你也可以參考這篇很棒的教學文章,找到如何客製化顯示文章的各種技巧和方法。
適合將 WordPress 當成 CMS 使用,並建立包含多個類別文章的頁面。
GUI
Klemens Starybrat 創造了List Category Posts 的 GUI。他在 WordPress 文字編輯中建立了一個漂亮的視覺化介面,可幫助你從其中建立短碼。你可以在這裡查看:
GUI for List Category Posts
AJAX 分頁
AJAX 分頁功能是由 Klemens Starybrat 的另一個相關外掛所維護。你可以在這裡查看:
LCP Ajax Pagination
小工具
自 WordPress 4.9 版以後,你可以在文字小工具中使用短碼。因此,你只需要在「外觀」 > 「小工具」中新增一個文字小工具,然後輸入 List Category Posts 短碼即可。
外掛還提供了小工具,簡單易用。您可以添加盡可能多的小工具,然後從「外觀」>「小工具」頁面選擇可用的所有選項。目前尚未在小工具中實現短碼中的所有功能。為了獲得最大的靈活性,你可以使用短碼進行客製化。
請阅读Wiki上的信息以便更瞭解插件的使用。
原文外掛簡介
List Category Posts allows you to list posts by category in a post or page using the [catlist] shortcode. When you’re editing a page or post, directly insert the shortcode in your text and the posts will be listed there. The basic usage would be something like this:
[catlist id=1]
[catlist name="news"]
The shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can also display the post author, date, excerpt, custom field values, even the content! A lot of parameters have been added to customize what to display and how to show it. Check the full documentation to learn about the different ways to use it.
The [catlist] shortcode can be used as many times as needed with different arguments on each post/page.
[catlist id=1 numberposts=10]
There’s an options page with only one option -for the moment-, new options will be implemented on demand (as long as they make sense). Right now the only global option is the numberposts parameter, to define a default number of posts to show for each instance (you can override this value by using the numberposts parameter in your shortcode).
Read the instructions to learn which parameters are available and how to use them.
If you want to List Categories instead of posts you can use my other plugin List categories.
You can find Frequently Asked Questions here.
Customization
The different elements to display can be styled with CSS. you can define an HTML tag to wrap the element with, and a CSS class for this tag. Check the documentation for usage. You can also check this nice tutorial which gives lots of tips and how-to’s to customize how to display the posts.
Great to use WordPress as a CMS, and create pages with several categories posts.
GUI
Klemens Starybrat has created a GUI for List Category Posts. It helps you create a shortcode from a nice visual interface in WordPress’ text editor. Check it out:
GUI for List Category Posts
AJAX pagination
The ajax pagination feature is maintained in an add-on plugin by Klemens Starybrat. Check it out:
LCP Ajax Pagination
Widget
Since WordPress 4.9, you can use shortcode in text widgets. So you can just add a text widget in Appearence > Widgets and write the List Category Posts shortcode.
The plugin also includes a widget as a simple interface for its functionality. Just add as many widgets as you want, and select all the available options from the Appearence > Widgets page. Not all the functionality in the shortcode has been implemented in the widget yet. You can use the shortcode for the most flexibility.
Please, read the information on the wiki and Changelog to be aware of new functionality, and improvements to the plugin.
Videos
Some users have made videos on how to use the plugin (thank you, you are awesome!), check them out here:
Manage WordPress Content with List Category Posts Plugin
WordPress: How to List Category Posts on a Page
Support the plugin
Klemens Starybrat has been writing lots of amazing code for this plugin, so if you’ve found it useful and want to pay it forward, consider sponsoring him on GitHub: https://github.com/sponsors/klemens-st
I have a PayPal account where you can donate too.
Development
Development is being tracked on GitHub. Fork it, code, make a pull request, suggest improvements, etc. over there. I dream of the day all of the WordPress plugins will be hosted on Git 🙂
Since the documentation on how to use the plugin has passed wordpress.org’s character limit, the text was cut. I’ve since started using a wiki for more comfortable reading and maintaining. Please check it out, suggestions are welcome on GitHub issues!
Instructions on how to use the plugin
Below you can find common shortcode use cases. You can use the shortcode while editing posts, pages, custom post types, text widgets and in all “page builder” plugins that support shortcodes.
Read the full documentation to discover many more features, including:
advanced post selection options (by date, search terms, custom fields, post types, custom taxonomies and more)
output customizations (show each post’s date, author, excerpt, thumbnail and more)
custom templates of your own design, based on a simple PHP example
List 10 latest posts:
[catlist]
The default number of listed posts is 10, to modify it you need to specify numberposts parameter:
[catlist numberposts=15]
List posts from the “Dogs” category:
[catlist name=Dogs]
List posts from the category with id 2:
[catlist id=2]
By default only the “post” post type is included. To list pages use:
[catlist post_type=page]
and for both posts and pages:
[catlist post_type="post,page"]
If we combine the above options we can get a shortcode that lists 15 items, including post and pages, from the “Dogs” category:
[catlist name=Dogs post_type="post,page" numberposts=15]
Most of the parameters you will find in the documentation can be used together.
The plugin can detect current post’s category and use it for listing:
[catlist categorypage=yes]
Same goes for tags:
[catlist currenttags=yes]
To show each post’s excerpt use:
[catlist excerpt=yes]
If you want to show the date, author and comments count next to each post, use:
[catlist date=yes author=yes comments=yes]
You can specify html tags and classes for many elements. Let’s modify the previous shortcode and wrap dates and authors in tags and classes of our choice:
[catlist date=yes date_tag=span date_class="my-date" author=yes author_tag=p author_class="my-author" comments=yes]
Read more about this feature
You can order posts by date:
[catlist orderby=date]
You can also use title, author, ID. More options are described in the documentation.
The plugin also supports pagination. You need to specify numberposts to tell the plugin how many posts per page you want:
[catlist pagination=yes numberposts=5]
See the wiki: Pagination for more information.
Please read the full documentation for detailed documentation of all plugin features, use cases and shortcode parameters.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「List category posts」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.9 | 0.10 | 0.11 | 0.12 | 0.13 | 0.14 | 0.15 | 0.16 | 0.17 | 0.18 | 0.19 | 0.20 | 0.21 | 0.22 | 0.23 | 0.24 | 0.25 | 0.27 | 0.30 | 0.31 | 0.32 | 0.33 | 0.34 | 0.35 | 0.36 | 0.37 | 0.38 | 0.39 | 0.43 | 0.44 | 0.45 | 0.46 | 0.47 | 0.48 | 0.49 | 0.50 | 0.51 | 0.52 | 0.53 | 0.54 | 0.55 | 0.56 | 0.57 | 0.58 | 0.59 | 0.60 | 0.61 | 0.62 | 0.63 | 0.64 | 0.65 | 0.66 | 0.67 | 0.68 | 0.69 | 0.70 | 0.71 | 0.72 | 0.73 | 0.74 | 0.75 | 0.76 | 0.77 | 0.78 | 0.79 | 0.80 | 0.81 | 0.82 | 0.83 | 0.84 | 0.85 | 0.86 | 0.87 | 0.88 | 0.89 | 0.1.1 | 0.4.1 | 0.7.1 | 0.7.2 | 0.8.1 | trunk | 0.10.1 | 0.11.1 | 0.11.2 | 0.13.1 | 0.14.1 | 0.15.1 | 0.16.1 | 0.17.1 | 0.17.2 | 0.18.1 | 0.18.2 | 0.18.3 | 0.19.1 | 0.19.2 | 0.19.3 | 0.20.1 | 0.20.2 | 0.20.3 | 0.20.4 | 0.20.5 | 0.21.1 | 0.21.2 | 0.22.1 | 0.22.2 | 0.22.3 | 0.23.1 | 0.23.2 | 0.27.1 | 0.30.1 | 0.30.2 | 0.30.3 | 0.34.1 | 0.36.1 | 0.36.2 | 0.40.0 | 0.40.1 | 0.41.0 | 0.41.1 | 0.41.2 | 0.42.0 | 0.42.1 | 0.42.2 | 0.42.3 | 0.43.1 | 0.44.1 | 0.46.1 | 0.46.2 | 0.46.3 | 0.46.4 | 0.49.1 | 0.50.1 | 0.50.2 | 0.50.3 | 0.54.1 | 0.54.2 | 0.58.1 | 0.59.1 | 0.59.2 | 0.60.1 | 0.63.1 | 0.67.1 | 0.71.1 | 0.73.1 | 0.73.2 | 0.74.1 | 0.74.2 | 0.75.1 | 0.75.2 | 0.76.1 | 0.77.1 | 0.78.1 | 0.80.1 | 0.80.2 | 0.80.3 | 0.83.1 | 0.84.1 | 0.84.2 | 0.85.1 | 0.86.1 | 0.88.1 | 0.89.1 | 0.89.2 | 0.89.3 | 0.89.4 | 0.89.5 | 0.89.6 | 0.89.7 | 0.89.8 | 0.89.9 | 0.90.0 | 0.90.1 | 0.90.2 | 0.90.3 |
延伸相關外掛(你可能也想知道)
Media Library Assistant 》媒體庫助手提供多個增強功能,方便管理媒體庫,其中包括:, , , , [mla_gallery] 短碼,在文章、頁面或自訂文章類型中使用,添加圖片和/或其他媒體庫項目(...。
WordPress Tag, Category, and Taxonomy Manager – AI Autotagger 》axoPress allows you to show a customizable display of the terms assigned to the current post. You can choose which taxonomy and which format to dis...。
Remove Category URL 》這個外掛可以徹底將 WordPress 網站的連結結構中的「/category/」去除(例如:從 mydomain.com/category/my-category/ 變成 mydomain.com/my-category/ )。,...。
Category Posts Widget 》Category Posts Widget是一個輕巧的小工具,設計用於一件事並且做得很好:顯示特定類別中最新的文章。, 基於詞語和類別的文章小工具, 這個免費小工具的高級版...。
Media Library Categories 》此外掛可允許在 WordPress 媒體庫中使用分類。啟用後,媒體庫中會顯示下拉式的分類清單。, 您可以使用大量動作進行多項目的分類更改、新增或移除分類。, 在使...。
Visual Term Description Editor 》此外掛會將分類說明編輯器替換成WordPress TinyMCE視覺編輯器,讓您可以在分類說明裡使用 HTML 並以豐富文字方式撰寫。此功能支援所有分類法,如標籤、分類、...。
Post Tags and Categories for Pages 》將文章標籤與分類套件套用於所有頁面,讓您可以使用 WordPress 原生的分類功能來分類您的頁面,並且會顯示在 WordPress 存檔查詢裡。, 這個外掛並不會自動顯...。
FV Top Level Categories 》這是針對 WordPress 3.1 及以上版本修復「Top Level Category」外掛程式的修正版。此外掛程式的目的是提供和原來程式相同的功能,但在新版本的 WordPress 上...。
Hide Categories and Products for Woocommerce 》這個外掛可以讓你隱藏選定的類別上的店鋪產品,並隱藏類別本身,無論是在列表還是單獨頁面中。, 它可以與 Storefront(主題)短代碼兼容。, 使用方式, , 前往...。
Flexible Posts Widget 》預設近期文章小工具非常簡單。我常常需要一個簡單的方法,能夠輕鬆地顯示任意文章類型或分類法的文章精選內容。這就是彈性文章小工具的由來。, 彈性文章小工...。
Essential Widgets 》Essential Widgets 是一款免費的 WordPress 插件,專門用於小工具,可以讓您在網站上創建和添加有趣的小工具,使其更具吸引力和親和力。Essential Widgets 忠...。
Category Tag Pages 》為您的頁面添加類別和標籤功能。, 此外掛會添加「post_tag」和「category」taxonomy (標籤和分類所使用的現有taxonomy名稱) 到「page」文章型別 (Post type) ...。
BulkPress 》在 WordPress 中加入多個分類可能非常麻煩。如果你想要為世界上每個國家添加分類,那麼填寫並提交新分類表單數百次就是一件非常糟糕的工作,尤其是當你添加具...。
Allow HTML in Category Descriptions 》當您在類別描述文本區添加文字並保存類別時,WordPress會運行內容過濾器,剝除除最基本格式標籤以外的所有內容。, 這個外掛程式可以禁用具有必要權限的角色的...。
Simply Exclude 》請注意,所有試用版本 2.0 和 2.0.1 的用戶,升級 Simply Exclude 設置到 2.0 版本格式的邏輯中有錯誤。如果您失去了您的設置,現在可以手動重新加載它們。只...。