內容簡介
取得最新文章列表。
配置
在調用此函數時,您可以傳遞參數來配置一些選項。
例如: 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_* 函數並整理代碼風格
外掛標籤
開發者團隊
原文外掛簡介
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
