
內容簡介
Display Posts 讓您輕鬆地列出網站上的所有內容。首先在內容編輯器中新增此短碼,以列出最近的文章清單:
[display-posts]
按類別篩選
若只想顯示特定類別的文章,使用 category 參數:
[display-posts category="news"]
以文章格狀顯示
透過少量的樣式設定,您可以創建一個漂亮、基於欄位的文章格狀。 看看這裡!
列出熱門文章
您可以採用多種方式強調熱門內容。如果想要展示留言最多的文章,使用:
[display-posts orderby="comment_count"]
您也可以列出社交分享最多的熱門文章。
包含縮略圖、摘要等
顯示參數可讓您控制每篇文章顯示的相關訊息。若想顯示圖像和摘要,使用:
[display-posts include_excerpt="true" image_size="thumbnail"]
您可以使用 WordPress 新增的任何圖片大小(縮略圖、medium、medium_large、large),或任何主題或其他外掛新增的自訂圖片大小。
隨意排序
預設情況下,文章清單會按時間順序列出,但您可以根據標題、自訂菜單順序、相關性、內容類型、元數據等進行排序。
列出即將到來的活動
您可以輕鬆地列出任何行事曆計畫中即將到來的活動。每款外掛都需要略微不同的程式碼。
這裡有常用活動日曆外掛程式碼教學。如果您使用的外掛未在此列出,提交支援請求,我會把它加進去!
教學
我們的教學包含常見的自訂要求,而且經常更新。
完整文檔
查詢參數用於自訂要列出的文章(按類別、標籤、日期過濾...)
顯示參數用於決定文章的顯示方式(標題、摘要、圖片...)
模板部件用於完全配合您的主題文章列表
輸出篩選器可完全控制文章清單在您的網站上的外觀
篩選器可讓開發人員進行更強大的自訂
擴展功能
顯示文章-翻頁——允許將顯示文章的結果分頁
顯示文章-日期檢視——讓您按月或年將內容分類
顯示文章-字母順序——以字母的順序列出您的內容
外掛標籤
開發者團隊
② 後台搜尋「Display Posts – Easy lists, grids, navigation, and more」→ 直接安裝(推薦)
原文外掛簡介
Display Posts allows you easily list content from all across your website. Start by adding this shortcode in the content editor to display a list of your most recent posts:
[display-posts]
Filter by Category
To only show posts within a certain category, use the category parameter:
[display-posts category="news"]
Display as Post Grid
You can create a great looking, column-based grid of posts with a bit of styling. Here’s how!
List Popular Posts
You can highlight your popular content in multiple ways. If you want to feature the posts with the most comments, use:
[display-posts orderby="comment_count"]
You can also list most popular posts by social shares.
Include thumbnails, excerpts, and more
The display parameters let you control what information is displayed for each post. To include an image and summary, use:
[display-posts include_excerpt="true" image_size="thumbnail"]
You can use any image size added by WordPress (thumbnail, medium, medium_large, large) OR any custom image size added by your theme or other plugins.
Sort the list however you like
By default the listing will list the newest content first, but you can order by title, menu order, relevance, content type, metadata, and more.
List upcoming events
You can easily list upcoming events from any event calendar. Each plugin will require slightly different code.
Here are tutorials for popular event calendar plugins. If your plugin is not listed here, submit a support request and I’ll add it!
Tutorials
Our tutorials cover common customization requests, and are updated often.
Full Documentation
Query parameters for customizing which posts are listed (filter by category, tag, date…)
Display parameters determine how the posts appear (title, excerpt, image…)
Template parts for Display Posts to perfectly match your theme’s post listings
Output filter for complete control over how the listing looks on your site
Filters for even more powerful customizations for developers
Extensions
Display Posts – Pagination – Allow results of Display Posts to be paginated
Display Posts – Date View – Lets you break your content down by month or year.
Display Posts – Alpha View – Display an alphabetical listing of your content, broken down by letter
Display Posts – Transient Cache – Cache the output using transients
Co-Authors Plus Addon – multiple authors on posts
Columns Extension – display posts in columns
DPS Exclude Sticky – exclude sticky posts unless specifically requested
DPS Pinch Zoomer – adds support pinch zooming post images on mobile devices and mouse wheel zooming on desktops
Display Posts Shortcode Remote – display posts from a remote WordPress site utilizing the WP REST API.
