[WordPress] 外掛分享: Recent Posts

首頁外掛目錄 › Recent Posts
500+
安裝啟用
尚無評分
3753 天前
最後更新
問題解決
WordPress 2.8+ v1.3 上架:2005-01-12

內容簡介

取得最新文章列表。

配置

在調用此函數時,您可以傳遞參數來配置一些選項。
例如: mdv_recent_posts(10, '', '<br />', true, 5, false, false)

參數:
$no_posts - 設定要顯示的最新文章數量
$before - 鏈接至最新文章前要顯示的文字
$after - 鏈接至最新文章後要顯示的文字
$hide_pass_post - 是否顯示需要密碼保護的文章
$skip_posts - 允許跳過指定數量的文章,再顯示 $no_posts 參數指定的文章數量
$show_excerpts - 允許在文章標題後輸出文章摘要
$include_pages - 允許顯示最新頁面的連結與最新文章一起

版本歷史

1.1.2 - 在“rel="bookmark"”前加入一個空格
1.1.3 - 真正修正了這個空格問題。感謝 Sandro Bonazzola
1.2 - 使用 esc_* 函數並整理代碼風格

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Recent Posts」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Retrieves a list of the most recent posts.
Configuration
You may pass parameters when calling the function to configure some of the options.
Example: mdv_recent_posts(10, '', '
', true, 5, false, false)
The parameters:
$no_posts – sets the number of recent posts to display
$before – text to be displayed before the link to the recent post
$after – text to be displayed after the link to the recent post
$hide_pass_post – whether or not to display password protected posts
$skip_posts – allows skipping of a number of posts before showing the number of posts specified with the $no_posts parameter
$show_excerpts – allows the post excerpt to be output after the post title
$include_pages – allows recent pages to be show with recent posts
Version History
1.1.2 – Added a space before rel=”bookmark”
1.1.3 – Fix the space for real. Props Sandro Bonazzola
1.2 – Use the esc_* functions and cleanup coding standards

延伸相關外掛

文章
Filter
Mastodon