
內容簡介
「最新文章簡碼和小工具」可協助使用者透過簡單的短碼(shortcode)在頁面或側邊欄(sidebar)輕易地顯示最新的文章。
預設顯示的是「最新文章」或「近期文章」,如果要變更顯示「隨機文章」或依「標題」排序等功能,可使用「orderby」設定。
選項和功能包括
所有參數和簡碼可在常見問題中查看:
* 常見問題
特色圖片
如果沒有特色圖片,自動從文章內容中的第一張圖片生成並加入特色圖片
自訂摘要長度
限制文章數量
從特定分類取得文章
從多個分類(以逗號分隔)取得文章
從特定作者取得文章
選擇文章類型
按日期、名稱等排序/顯示
顯示文章發布日期
使用文章 ID(以逗號分隔)顯示特定文章
依標籤顯示/篩選文章
依元數鍵和元數值顯示/篩選文章
自訂「閱讀更多」標籤選項
顯示預設/自訂圖片尺寸(例如縮圖、中等大小等),而非特色圖片
使用方式
基礎:[recentposts-sc](預設為最新的 3 篇文章)
在文字小工具(text widget)中也可使用 [recentposts-sc](詳細需求請參考截圖)
進階參數:
numberofposts(文章數量)
限制/指定要顯示的文章篇數
預設:3
例子:[recentposts-sc numberofposts=”6″]
post_type(文章類型)
指定要使用的文章類型,例如文章或頁面
預設類型:文章(post)
例子:[recentposts-sc post_type=”page”]
get_cat_name(分類名稱)
如果要在文章列表中顯示分類名稱
預設:False
例子:[recentposts-sc get_cat_name=”true”]
excerptlength(自訂摘要長度)
定義自訂摘要長度
例子:[recentposts-sc excerptlength=”30″]
enable_excerpt(顯示/隱藏摘要)
有時可能不想顯示摘要,只想保留標題和圖片。要關閉/停用摘要,請使用 enable_excerpt=”false”(預設為 true)
例子:[recentposts-sc enable_excerpt=”false”]
image_size(顯示預設/自訂圖片尺寸,而非特色圖片)
選擇要顯示的圖片尺寸,例如縮圖、中等大小等(預設顯示特色圖片)
使用 image_size(預設為 false)
例子:[recentposts-sc image_size=”thumbnail”] 或 [recentposts-sc image_size=”medium”]
如有自訂圖片尺寸,也可使用。
category(從特定分類中取得文章)
篩選來自單一或多個分類的文章
單一分類篩選範例:[recentposts-sc category=”lesson”]
多重分類篩選範例:[recentposts-sc category=”lesson,lesson2,lesson3″]
author(從特定作者中取得文章)
篩選來自特定作者的文章
篩選範例:[recentposts-sc author=”admin”]
其他參數和簡碼可在常見問題中查看:
*
外掛標籤
開發者團隊
② 後台搜尋「Recent Posts Shortcode & Widget」→ 直接安裝(推薦)
原文外掛簡介
The “Recent Posts Shortcode & Widget” helps users to easily display latest posts in a page or in sidebar by just using simple shortcode [recentposts-sc]
By default it displays “latest posts” or “recent posts” which can be changed to display “random posts”, display by ‘title’ etc using ‘orderby’.
Options and Features Includes
All Parameters/Shortcodes can be seen in FAQ:
* FAQ
Featured Image
Auto generates and adds featured image using first image of the post if no featured image is found
Custom excerpt length
Limit number of posts
Posts from specific category
Posts from multiple categories (comma separated)
Posts from specific author
Post type option
Order/Display by date, name etc.
Display post date.
Display specific posts using post IDS (comma separated)
Display/filter posts by tag
Display/filter posts by meta key and meta values
Custom “Read more” label option.
Display default/custom image size instead of featured image (like thumbnail, medium etc)
How to Use
Basic: [recentposts-sc] (by default 3 latest posts)
For sidebar also use [recentposts-sc] in text widgets (refer screenshots as well for further help)
Advanced Parameters:
numberofposts (Number of posts)
Limit/Specify the number of posts you want to display
Default: 3
Example: [recentposts-sc numberofposts=”6″]
post_type (Post Type)
Specify which post type you want to use. For example posts or pages
Default type: post
Example: [recentposts-sc post_type=”page”]
get_cat_name (Category Name)
If you want to display category name in list of posts
Default: False
Example: [recentposts-sc get_cat_name=”true”]
excerptlength (Custom Excerpt Length)
Define custom excerpt length
Example: [recentposts-sc excerptlength=”30″]
enable_excerpt (Show/hide Excerpt display)
Sometimes you may not want to display excerpt and only like to keep title and image. To turn off/disable excerpts use enable_excerpt=”false” (default is true)
Example: [recentposts-sc enable_excerpt=”false”]
image_size (Display default/custom image size instead of featured image)
Select image size like thumbnail, medium etc (by default featured image is displayed)
use image_size (default is false)
Example: [recentposts-sc image_size=”thumbnail”] or [recentposts-sc image_size=”medium”]
You can also use any custom image size if present in your website.
category (Posts from specific Category/categories)
Filter posts from single category or multiple categories
Example single category: [recentposts-sc category=”lesson”]
Example multiple categories: [recentposts-sc category=”lesson,lesson2,lesson3″]
author (Posts from specific author)
Filter posts from specific author
Example: [recentposts-sc author=”admin”]
More Parameters/Shortcodes can be seen in FAQ:
* FAQ.
Support
Forum support
Rate/Review the plugin
Developed by rajros
