內容簡介
此外掛建立 [Category] 短代碼,短代碼帶有五個引數:
number:要顯示的文章數,0 表示使用預設數量。-1 表示全部顯示。
Order:升冪或降冪。
Display Method:完整、摘要或標題。
Order By:根據作者、日期、標題、修改日期、繼承、ID、隨機、無或評論數進行排列。
Category:此為欲搜尋之類別或類別的 ID。可以使用逗號分隔多個類別。
範例短代碼:
[Category number=’5′ method=’title’ order=’asc’ id=’11,45′ orderby=’comment_count’]
此代碼會顯示 11 和 45 類別中,標題或評論數最高的五篇文章,按升序排列。
致謝
非常感謝 g33kg0dd3ss 找到 1.3 版本修正迴圈錯誤的問題,並提供補丁。
未來的新增功能?
讓外掛表單能夠選擇多個類別
讓外掛表單能夠選擇多個排列方法
在管理員表單中限制文章數僅接受數字輸入。
在管理員表單中加入複製貼上指令碼。
接受類別名稱作為有效輸入。
國際化外掛
改進文章格式或讓格式更容易編輯,使使用者更可以控制格式。
允許添加的附件
開啟或關閉標題連結。
在輸出中允許評論。
讓使用者可以更多地控制文章格式。
新增能夠透過短代碼修改縮圖選項的功能。
外掛標籤
開發者團隊
原文外掛簡介
This plugin creates the [Category]] Shortcode. The code takes 5 arguments:
number: the number of posts to display. 0 equals the default number. -1 equals the total available.
Order: Ascending or Descending
Display Method: Full, Excerpt, Title
Order By: Author, Date, Title, Modified, Parent, ID, Rand, None, or Comment Count.
Category: this is the category id the category or categories that should be searched. Multiple categories can be specified in a comma separated list.
Example shortcode:
[Category number=’5′ method=’title’ order=’asc’ id=’11,45′ orderby=’comment_count’]
This will show 5 posts in ascending order of category 11 and 45 as arranged by comment_count and will display just the post titles.
Acknowledgements
A big thank you to g33kg0dd3ss for figuring out the 1.3 fix issue with the loop being broken. She contributed the patch fix.
Future Additions?
Let plugin form allow for multiple category selections
Let plugin form allow for multiple orderby methods
In admin form restrict Number of posts to numbers only.
In admin form setup a copy and paste script
Accept a category name as a valid input
Internationalization of the plugin
Improve Formatting of Posts / Make formatting easier to edit./ Give user more control over formatting
Allow attachments to come through
Turn title links on or off.
Allow comments in output
Give user more control over the postformatting
Add ability to modify thumbnail options through shortcode
