前言介紹
- 這款 WordPress 外掛「Archivist – Custom Archive Templates」是 2011-09-14 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 1000 個安裝啟用數。
- 上一次更新是 2024-02-23,距離現在已有 436 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 有 10 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
eteubert |
外掛標籤
tag | loop | archive | category | shortcode |
內容簡介
快速入門
此外掛程式假設您的文章已經有良好的分類。
使用快捷碼在頁面或文章的任何位置顯示存檔。
[archivist category="kitten"]
[archivist tag="kitten"]
將 “kitten” 替換為您的分類/標籤。請注意,需要使用分類/標籤的 slug。(即名稱去掉大寫字母和空格)
佔位符
您可以指定自訂模板以顯示存檔元素。
前往 設定 > Archivist 取得外掛程式首選設定。
使用 HTML 及下列的模板佔位符號。
%TITLE% – 文章標題。
%PERMALINK% – 文章永久連結。
%AUTHOR% – 文章作者。
%CATEGORIES% – 文章分類,以項目清單(unordered list)的方式呈現。
%CATEGORIES|...% – 文章分類,使用自定義分隔符。例如: %CATEGORIES|, %
%TAGS% – 文章標籤,預設使用分隔符。
%TAGS|...% – 文章標籤,使用自定義分隔符。例如: %TAGS|, %
%EXCERPT% – 文章摘要。
%POST_META|...% – 文章中的任何文章 meta 資料。例如: %POST_META|duration%。
%POST_META|...|...% – 使用自定義 HTML 分隔符號呈現文章中的任何文章 meta 資料清單。例如: %POST_META|guest|
%
%DATE% – 以預設格式呈現文章日期。
%DATE|...% – 以自定義格式呈現文章日期。例如: %DATE|Y/m/d%
%POST_THUMBNAIL|...x...% – 以特定尺寸呈現文章縮圖。例如: %POST_THUMBNAIL|75x75%
%COMMENTS% – 文章評論數量。
%ACF|field_name% – 顯示 ACF 套件 包含的欄位。使用 get_field() 函式。
您可以新增您自己的佔位符:
add_filter( 'archivist_template_render', function( $template, $post ) {
// modify $template
return $template;
}, 10, 2 );
分頁
如果您有很多文章,您可能會想要分頁。Archivist 外掛程式內建異步分頁功能。在快捷碼中使用 pagination 參數啟用它。參數設定是每頁要顯示的文章篇數。
[archivist category="kitten" pagination="10"]
分頁控制會顯示在存檔的頂部和底部。您可以通過將 controls 設置為 top 或 bottom 進行自定義。
[archivist category="kitten" pagination="10" controls="top"]
依據查詢篩選
您感到有挑戰性?分類或存檔中的篩選還不足以滿足您?繼續閱讀,挑戰英文文檔:
WordPress 使用某些查詢語法定義所謂的迴圈 (loop),以顯示存檔。
您可以在 https://codex.wordpress.org/Class_Reference/WP_Query 上查看完整文檔。
您可以利用列在文檔中的每個參數或參數組合。以下是一些示例:
[archivist query="year=1984&author_name=gorwell"]
列出所有 1984 年由使用者 NICENAME 為 gorwell 的作者撰寫的文章。
原文外掛簡介
Quick Start
The plugin assumes your articles are well categorized.
To display the archive, use the shortcode anywhere in a page or article.
[archivist category="kitten"]
[archivist tag="kitten"]
Replace “kitten” with your category/tag. Watch out, we need the slug here.
That’s the name without capital letters and spaces.
Placeholders
You can specify a custom template to display the archive elements.
Go to Settings > Archivist for plugin preferences.
Use HTML and any of the following template placeholders.
%TITLE% – The post title.
%PERMALINK% – The post permalink.
%AUTHOR% – The post author.
%CATEGORIES% – The post categories as unordered list.
%CATEGORIES|...% – The post categories with a custom separator. Example: %CATEGORIES|, %
%TAGS% – The post tags with default separator.
%TAGS|...% – The post tags with a custom separator. Example: %TAGS|, %
%EXCERPT% – The post excerpt.
%POST_META|...% – Any post meta. Example: %POST_META|duration%.
%POST_META|...|...% – Any post meta list, separated by custom HTML. Example: %POST_META|guest|
%
%DATE% – The post date with default format.
%DATE|...% – The post date with custom format. Example: %DATE|Y/m/d%
%POST_THUMBNAIL|...x...% – The post thumbnail with certain dimensions. Example: %POST_THUMBNAIL|75x75%
%COMMENTS% – The post comment count.
%ACF|field_name% – Display ACF field. Uses the get_field() function.
You can add your own placeholders:
add_filter( 'archivist_template_render', function( $template, $post ) {
// modify $template
return $template;
}, 10, 2 );
Pagination
If you have many entries, you may prefer to paginate. The archivist comes with asynchronous pagination built-in. Use the pagination parameter in the shortcode to activate it. Its value is the amount of items you want to display per page.
[archivist category="kitten" pagination="10"]
Pagination controls are displayed both on top and at the bottom of the archive. You can customize this by setting controls to top or bottom.
[archivist category="kitten" pagination="10" controls="top"]
Filter by Query
Are you feeling bold? Is filtering by category or archive not satisfying you? Read on, I’ve got a challenge for you.
WordPress uses a certain query syntax to define the so called loop which is used to display the archive.
You can find the complete documentation at https://codex.wordpress.org/Class_Reference/WP_Query
and you can take advantage of every single parameter or combination of parameters listed there. Some examples:
[archivist query="year=1984&author_name=gorwell"]
Lists all entries from the year 1984 by the author with user_nicename gorwell.
[archivist query="tag=straw+mask&post_status=private&orderby=comment_count&order=DESC"]
Lists all entries marked with post status private which are tagged with both straw and mask, ordered by the amount of comments in a descending order.
Using multiple Templates
When you install the plugin, there is just one templated called “default”.
If you don’t specify a specific template in the shortcode, this one will be used.
Therefore the following two shortcodes yield identical results.
[archivist category="kitten"]
[archivist category="kitten" template="default"]
You can add as many templates as you like. Think twice before deleting one. If it’s still in use, the archive can’t be displayed.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Archivist – Custom Archive Templates」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.4 | 1.6 | 1.7 | 1.0.0 | 1.1.0 | 1.2.0 | 1.2.1 | 1.2.2 | 1.2.3 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.3.5 | 1.3.6 | 1.3.7 | 1.3.8 | 1.4.1 | 1.4.2 | 1.4.3 | 1.5.1 | 1.7.1 | 1.7.2 | 1.7.3 | 1.7.4 | 1.7.6 | 1.7.7 | trunk |
延伸相關外掛(你可能也想知道)
Elementor Custom Skin 》此外掛程式可向 Elementor 頁面建構器的文章和文章總覽 widget 添加新的佈景主題。, 您可以像單個模板一樣設計循環項目,並將其用作佈景主題,以便您可以按照...。
Custom Content Shortcode 》停用通知, , 此外掛已不再維護。, 請改使用下一代範本系統:Loops & Logic。, 概述, , 從單一欄位到整個頁面,Custom Content Shortcode 是一套指令,可...。
Loops & Logic 》Facebook group | homepage| docs |official support forum, Loops & Logic 是一個工具集,讓你可以對 WordPress 內容和數據在網站前端進行廣泛的控制,...。
Genesis Grid 》Genesis Grid 外掛的設計目的在於讓 Genesis 主題的使用者可以輕鬆地以網格格式顯示他們的文章。, 「特色文章」是列表頂部的全寬文章,而「概要」是分成多欄...。
WP Query Creator 》這個外掛讓你可以建立新的 WP 查詢,並在頁面上使用簡碼進行查詢。, WP 查詢建立器是最簡單的方法,可以在不寫一行程式碼的情況下建立 wp_query。, 有時當你...。
No Sub-Category Posts in Loops 》這個外掛啟用後,只會在迴圈中顯示當前分類的文章(不會顯示子分類中的文章)。, 這就是它的全部功能,沒有任何選項。如果您需要選項,請告訴我,我會加入進...。
Elevate Parent Category Template 》此外掛可提供函數來取得指定文章的母類別(父類別)資訊,若該文章被歸入於母類別的子類別中。, 透過這個功能,此外掛也能夠修改 WordPress 迴圈(Loop)並將...。
Custom Post Type Selector 》自定文章類型選擇器讓您可以選擇要包括在博客的主迴圈中的文章類型,包括自定文章類型。, 如果您覺得這個外掛有用,請捐贈給 Cancer Research UK,並透過我的...。
Easy 》Easy 是一個多功能的小工具,包含大部分常用於 WordPress 模板的原生功能。, 你可以將幾乎任何部分的內容放置在側邊欄的任何位置。, 此小工具由拖放建構而成...。
Wp Loop 》這個外掛會在你的 WordPress 網站上新增一個小工具,稱為「Wp Loop」,可以在需要的地方發佈此小工具並設定其選項,它會建立一個 WordPress 查詢循環,具有網...。
Post Category 》使用 The Loop 來顯示來自特定類別的文章。使用 The Loop,外掛處理每篇要在目前頁面顯示的文章,並根據匹配指定條件的方式進行格式化。, 您可以生成自己的短...。
mCatFilter 》mCatFilter 是一個 WordPress 外掛,允許您從首頁、rss 等存檔頁面中排除特定分類。, 關鍵特點, , 簡單易用的設置與配置, 不需要更改主題, 即使排除了分類,...。
Genesis Grid 》擴展 Genesis 網格至頁面模板。更多資訊即將推出…, 重要提示:, 您必須已安裝Genesis外掛,按此處了解更多:Genesis, 特別感謝, 我要向StudioPress的所...。
Widget Custom Loop 》這個小工具讓使用者可以建立自訂的迴圈。, 待辦事項, , 在迴圈前後新增短代碼, 。
Recent Posts Only 》此外掛可以限制首頁所顯示的文章數量,使用者可以自行設定希望顯示多久以前的文章。此限制僅在首頁生效,插件或其他頁面(例如尋找文章頁面等)所顯示的文章...。