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

Show Post Shortcode

外掛說明

This simple shortcode plugin allows you to list posts as a bulleted list linking to the full article. You can limit
the list to posts from a specific category and you can select the number of posts to show. The order and
orderby options lets you sort the list too.

Usage is simple. Create a page or post and use the code [showposts category="2" num="4"] – this will show
all 4 posts from category 2. Another example [showposts category="1" num="-1" orderby="date" order="DESC"]
shows all the posts from category 1 ordered by the date (newest post first).

By default, only 5 posts are shown (unless you use the num option) and sorting in by date (oldest to newest).

Example

You can see two examples of the code working at the following links:

  • http://www.xtremeps3.com/firmware-history/
  • http://www.xtremeps3.com/faqs/

Usage

The shortcode is [showposts]

You can use the following parameters to customize what is displayed (all are optional):

[showposts category="2" num="4" order="DESC" orderby="date"]

Set order to one of the following:

  • author – Sort by the numeric author IDs.
  • category – Sort by the numeric category IDs.
  • content – Sort by content.
  • date – Sort by creation date.
  • ID – Sort by numeric post ID.
  • menu_order – Sort by the menu order. Only useful with pages.
  • mime_type – Sort by MIME type. Only useful with attachments.
  • modified – Sort by last modified date.
  • name – Sort by stub.
  • parent – Sort by parent ID.
  • password – Sort by password.
  • rand – Randomly sort results.
  • status – Sort by status.
  • title – Sort by title.
  • type – Sort by type.

    orderby can be one the following:

  • DESC

  • ASC

安裝方式

  1. Upload show-posts-shortcode.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place [showposts category="2" num="4"] in your post or pages

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Show Post Shortcode〉的開發相關工作。

參與者

將〈Show Post Shortcode〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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