內容簡介
此外掛可以透過簡碼或在古騰堡區塊編輯器中顯示小工具區域中最新更改的清單。
這可以包括已變更的頁面和/或文章(可配置)。
其他功能包括:
選擇列表中的條目數
定義要排除的頁面
顯示頁面/文章的作者
排除頁面或文章
要排除在小工具中列出的頁面或文章,請執行以下步驟:
打開您要排除的頁面或文章進行編輯。
開啟「螢幕選項」(在頁面右上方)
確保已選中「自訂欄位」(參見第三張屏幕截圖)
在螢幕下方的「自訂欄位」中添加以下自訂欄位(參見第四張屏幕截圖):
名稱:list_last_changes_ignore
值:true
要再次包含它,將值設為false,或完全刪除自訂欄位。
區塊編輯器(古騰堡)
可以在小工具 -> 列出最近變更中找到該區塊。
可以在區塊設置中(右側面板)配置該區塊。
與小工具不同,在區塊中不會撰寫標題。如果需要標題,則必須在「列出最近變更」區塊前自己定義標題區塊。
簡碼
要透過簡碼顯示最近更改的清單,使用以下語法:
[list_last_changes number='7' showpages='true' showposts='true' showauthor='false' template='{title} {change_date} {author}' /]
屬性「number」定義顯示的條目數。
通過屬性「showpages」和「showposts」,可以包含已更改的頁面和/或文章。
要顯示作者,將屬性「showauthor」設置為true(不建議,請改用範本機制)
「template」屬性定義條目的內容。如果定義了「template」屬性,則「showauthor」屬性將被忽略。
與小工具不同,在簡碼中不會撰寫標題。如果需要標題,則必須在簡碼前手動定義。
範本
在模板字串中,可以使用以下字段:{title}、{change_date}和{author}。
{title}:頁面或文章的標題及其連結
{change_date}:頁面或文章更改的日期
{author}:頁面或文章的作者
範例範本:
{title} {change_date}:預設範本
{title} {change_date} {author}:與0.9版本之前啟用的作者標誌行為相同
{change_date}:僅顯示更改日期,可與number = 1一起使用,表示WordPress網站的最後修改日期。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Shows a list of the last changes in the widget area, via shortcode or in the gutenberg block editor.
This can include changed pages and/or posts (configurable).
Additional features include:
Select the number of entries in the list
Define pages to be excluded
Show the author or the last editor of the page/post
Select and order by date modified or date published
Exclude page or post
To exclude a page or post from being listed in the widget do the following steps:
Open the page or post you want to exclude for editing.
Open the “Screen Options” (on the top right of the page)
Ensure that “Custom Fields” is checked (see Screenshot #3)
In the “Custom Fields” further down the screen add the following custom field (see Screenshot #4):
name: list_last_changes_ignore
value: true
To include it again set the value to false or remove the custom field completely.
Block Editor (Gutenberg)
The block can be found in Widgets -> List Last Changes.
The block can be configured in the block settings (panel on the right side)
In difference to the widget, with the block no title is written. If a title is needed it has to be defined in an own block in front of the List Last Changes block.
Shortcode
To show the list of the last changes via shortcode use the following syntax:
[list_last_changes number='7' showpages='true' showposts='true' showauthor='false' usedatepublished='true' template='{title} {change_date} {author}' /]
The attribute ‘number’ defines the number of entries shown.
With the attributes ‘showpages’ and ‘showposts’ changed pages and/or posts are included.
To show also the author set the attribute ‘showauthor’ to true (deprecated, use template mechanism instead).
With the attribute ‘usedatepublished’ set to ‘true’ the date when the page or post was first published, if set to ‘false’ (or not set at all) the date the page or post was modified is used.
The ‘template’ attribute defines the content of the entries. If the ‘template’ attribute is defined the attribute ‘showauthor’ is ignored.
In difference to the widget, with the shortcode no title is written. If a title is needed it has to be defined by hand in front of the shortcode.
Templates
In the template string the following fields can be used: {title}, {change_date}, {published_date}, {author} and {editor}.
{title} : the title of the page or post with a link to it
{change_date} or {change_date[format]} : the date the page or post was changed (“modified date”)
{published_date} or {published_date[format]} : the date the page or post was published (“post date”)
{author} : the author of the page or post
{editor} : the last editor of the page or post
With the optional [format] the date format of change_date and published_date can be defined. The date format is in the php date formatting.
Without definition the wordpress system date format is used.
Sample templates:
{title} {change_date} : the default template
{title} {change_date[Y-m-d H:i]} : like the default template but with date and time defined by the given format
{title} {change_date} {author} : behaves as in versions before 0.9 when show author was enabled
{change_date} : shows only the change_date, can be used with number = 1 as last modified date of a WordPress Site
