前言介紹
- 這款 WordPress 外掛「Custom Post Type Archives」是 2010-08-25 上架。
- 目前有 300 個安裝啟用數。
- 上一次更新是 2011-08-08,距離現在已有 5017 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
ratrijs |
外掛標籤
archive | post type | post types | custom post type | custom post types |
內容簡介
自從 WordPress 3.1 版本以來,它已經有了自己的自訂文章類型檔案庫實作,因此您可以在不使用此外掛的情況下創建它們 - 訪問此頁面以獲得更多信息-> https://codex.wordpress.org/Post_Types。儘管如此,我確信這個外掛更具靈活性,您仍然可以使用它,它將像預期的那樣運作。
這個外掛將啟用自訂文章類型的檔案庫(包括年度、月度和日常),以及提供自訂標題和分頁的選項。
當您訪問類別或標籤存檔的網址(例如:http://example.com/category/example)時,這些檔案庫將與它們的運作方式相同。
WordPress 3.0的新自訂文章類型功能非常棒。唯一的問題是 - 它缺少這些文章類型的檔案庫功能,因此您無法輕鬆地指派一個URL來僅列出您的“相片”文章類型文章。您也將無法從這個文章類型獲取饋送。這個外掛將這個功能添加到 WordPress 中,以便您完全可以享受自定義文章類型。它還將讓您為您的文章類型檔案庫創建單獨的模板,這在以前是不可能的。如果您是主題開發人員,您將能夠使用您所熟悉的相同東西,如果您不是開發人員,但只想為您的博客啟用此功能,那麼您也可以享受這個功能。
使用此外掛,您將能夠指定以下內容:
自訂文章類型的URL基礎。假設您有一個名為“photo”的文章類型,您可以在URL http://example.com/photo或http://example.com/post-type/photo中列出所有文章類型 - 只需填寫一個字段即可。
是否將自訂文章類型重寫為URL參數。它的默認值為true,因為它應該工作,但關閉此選項可能更有效。詳細信息請閱讀常見問題解答。此外,如果啟用此選項,則您將能夠為每個已啟用的自訂文章類型檔案庫指定自訂重寫縮略詞。
自訂文章類型檔案庫的標題。您可以在此選項中使用{POST_TYPE_NAME}和{POST_TYPE_SINGULAR_NAME}變數。{POST_TYPE_NAME}將替換為當前文章類型的名稱,而{POST_TYPE_SINGULAR_NAME}將替換為當前文章類型的單數名稱。因此,如果您在文章類型“photo”中,並且此選項設置為“Post Type“{POST_TYPE_SINGULAR_NAME}”,那麼標題將顯示“Post Type“Photos”的名稱。您還可以使用{SEP}、{SEP_LEFT_SPACE}、{SEP_RIGHT_SPACE}和{SEP_SPACED}。這些將替換wp_title函數中指定的分隔符。間隔的選項將在定義的側面有空間。{SEP_LEFT_SPACE}在左側有空格,反之亦然。{SEP_SPACED}在兩側都有空間。我必須以這種方式做,因為WordPress在保存之前修剪變量。如果留空(此選項),外掛將不會更改標題。您還可以為每個啟用的自訂文章類型檔案庫指定自定義標題。
呈現自訂文章類型的模板文件。您可以使用一個模板來渲染所有文章類型,也可以只輸入“post-type-{POST_TYPE}.php”,對於文章類型“photo”,外掛將嘗試包含“post-type-photo.php”以渲染自訂文章類型。
如果未找到上述模板文件,則加載哪個模板文件。所以很容易使用index.php來為所有文章類型除了“photo”之外的範例。
是否為自訂文章類型檔案庫添加饋送鏈接。將像任何其他饋送鏈接一樣工作,例如在類別索引頁面中,訪問者可以訂閱您的網站更新。如果...需要,外掛將自動插入饋送鏈接
原文外掛簡介
Since version 3.1 WordPress has it’s own implementation of custom post type archives so you can create them without this plugin – visit this page for more info -> https://codex.wordpress.org/Post_Types. Nevertheless I do believe that this plugin is more flexible and you can still use it and it will still work as expected.
This plugin will enable custom post type archives (also yearly, monthly and daily) together with feeds, customizable titles and paging.
These archives will work the same way as the category or tag archives work when you go to, for example, http://example.com/category/example.
WordPress 3.0 new custom post type feature is awesome. The only problem is – it lacks archive functionality for these post types so you can’t easely assign one URL to just list your ‘photo’ post type posts. You also won’t be able to get feeds just from this post type. This plugin adds this functionality to WordPress so that you can fully enjoy custom post types. It will also let you to create seperate templates for your post type archives which wasn’t possible before. You will be able to use the same things you are familiar with if you are a theme developer as well as you will be able to enjoy this feature if you are not a developer but just want to enable this feature for your blog.
With this plugin you will be able to specify:
URL base for custom post types. Assuming you have a post type named ‘photo’, you can list all your post types in URL http://example.com/photo or http://example.com/post-type/photo – whatever you like by simply filling one field.
Whether to use the custom post type rewrite slug or custom post type name as URL parameter after ‘URL base’. It defaults to true, because that’s the way it should work, but it might be more efficient to disable this option. For more information please read the FAQ. Also if this option is enabled then you will be able to specify a custom rewrite slug for each enabled custom post type archive.
Title for post type archives. You can use {POST_TYPE_NAME} and {POST_TYPE_SINGULAR_NAME} variables into this option. {POST_TYPE_NAME} will be replaces with current post types name and {POST_TYPE_SINGULAR_NAME} will be replaces with current post types singular name. So if you are in post type ‘photo’ and this option is set to ‘Post Type “{POST_TYPE_SINGULAR_NAME}”‘ then the title will say ‘Post Type “Photos”‘. You can also use {SEP}, {SEP_LEFT_SPACE}, {SEP_RIGHT_SPACE}, {SEP_SPACED}. These will be replaced with seperator specified in wp_title function. Spaced ones will have the space on defined side. {SEP_LEFT_SPACE} will have space in left side and vice verca. {SEP_SPACED} will have spaced on both sides. I had to do this in this way, because WordPress trims variables before saving. If left blank (this option), plugin won’t change the title. You can also specify a custom title for each enabled custom post type archive.
What template file to use for rendering a custom post type. You can use either one template for all post types or just type ‘post-type-{POST_TYPE}.php’ and for post type ‘photo’ plugin will try to include ‘post-type-photo.php’ to render the custom post type.
What template file to load if above template file is not found. So it’s easy to use index.php for all post types except ‘photo’ for example.
Whether to add a feed link for custom post type archive. Will work the same way as any other feed links, for example in category index pages where your visitors can subscribe to your site updates. Plugin will automatically insert the feed link if ‘automatic-feed-links’ is enabled for your theme. If that’s true then plugin won’t show this option in plugin settings.
Post types that gets archives. Just tick the checkboxes next to those post types you want to see archives. Easy as that.
Note that if you update URL base field, disable/enable post type rewrite tag usage or enable/disable some post type archives, then you will have to visit ‘Permalinks’ section under ‘Settings’ to flush old permalinks and enable the changes.
Also a good thing for theme developers – you have four new functions to use:
pta_is_post_type_archive – this function will work similary as is_category or is_single and so on. It will return true if this page is a custom post type archive or false if it isn’t. You can also specify an optional argument with post type name and then function will return boolean to say whether you’re in post type archive for that post type or not. Simple and useful!
get_the_post_type_permalink – this function will return a link to custom post type archive for current post in the WordPress loop. Or you can specify a post type slug or post ID or post object as an argument if you are not in a loop. In this way you can always link to custom post type archives wherever you are.
the_post_type_permalink – uses get_the_post_type_permalink to echo the link rather than return it.
wp_get_post_type_archives – will work the same way as ‘wp_get_archives’ function that allows you to get yearly, monthly, daily (and so on) archives for custom post types.
If you have any issues at all, please try these steps that hopefully will help you:
check out the Faq section to search for an answer for your question
visit plugins homepage (http://ratvars.com/custom-post-type-archives) for more information (you can also leave a comment there)
create a new forum topic in here about the issue you’re having
I will try to help you as good as I can.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Custom Post Type Archives」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.1.1 | 1.2.1 | 1.2.2 | 1.5.1 | trunk | 1.1.1.1 |
延伸相關外掛(你可能也想知道)
WP Page Numbers 》使用者友善的導覽, 使用者可以輕鬆地通過頁數而非上一頁/下一頁的連結,快速找到所需的頁面。這對於 SEO(搜索引擎優化)很有好處,因為它創建了更緊密的內部...。
Jetpack VaultPress 》請注意:此外掛已不再對新客戶提供支援。, 對於下一代的 VaultPress 技術,我們建議使用 Jetpack Security。它包括實時備份、惡意軟件掃描、反垃圾評論保護和...。
Annual Archive 》Annual Archive 外掛改善了 WordPress 篩選文章的 shortcode 和側邊欄小工具。文章可以按照日、週、月或年進行篩選。列表可以按十年分組,並且可以按文章類型...。
Easy Custom Auto Excerpt 》Easy Custom Auto Excerpt 是一款 WordPress 外掛,用於對於在首頁、搜尋或存檔頁面顯示的文章進行裁剪/摘要。此外,該外掛還允許你自定義「閱讀更多」按鈕文...。
Simple Yearly Archive 》Simple Yearly Archive是一個簡單而漂亮的WordPress外掛程式,可以讓您以年為基礎的列表顯示存檔,基本上和WP存檔一樣,但會按照發布年份將所有發布的文章分...。
Posts List 》這個 WordPress 外掛可以透過輸入簡碼 [posts-list],在網站上新增一個文章列表或頁面列表。, 第一個範例展示了如何以最簡單的形式添加文章列表。, [post...。
Archive Content with Archived Post Status 》你覺得這個外掛有幫助嗎?請考慮在這裡給予五顆星評價。, 這個外掛讓你可以將 WordPress 內容歸檔,就像你歸檔電子郵件一樣。, , 在下拉式選單中新增了一個名...。
WP-dTree 》本外掛提供能夠替換標準存檔、分類、頁面和連結列表的動態導覽樹,並以小工具方式提供設定拖放的簡便性,同時也為開發人員提供數個新的模板標籤。作者為 Ulf ...。
Ultimate Noindex Nofollow Tool II 》這款 WordPress 外掛可以通過將選定頁面設置為「nofollow」,從而提高網站的搜索引擎優化。, 該外掛能夠給檔案庫、分類、搜尋、標簽、作者、登入、管理等頁面...。
Advanced Posts/Page 》Advanced Posts per Page 可以精細地控制您的 WordPress 專案頁面中每個文章存檔頁面顯示的文章數量。, 現在,有別於以往只能在「部落格頁面最多顯示 x 篇文...。
JS Archive List 》此外掛提供一個小工具和一個篩選器,使用 JS JS library 在側邊欄或文章中顯示可折疊的存檔列表。, 功能, , 顯示可折疊的存檔列表以減少空間使用。, 使用 JS ...。
Custom Archive Titles 》「Custom Archive Titles」外掛允許您更改 WordPress 中存檔標題的預設文字。, 可套用於以下功能, , 分類存檔(分類:%s), 標籤存檔(標籤:%s), 作者存檔...。
Advanced Custom Fields : CPT Options Pages 》這是一個針對 ACF Options 的小型附加外掛程式。為每個自訂文章類型添加 ACF 定位。, 大版本 2 中的新功能!, 重要!, 升級到 v2+ 後,您必須重新連接欄位群...。
Sitekit 》, Speedup and Protect WordPress |, Sitekit |, 贊助 |, GitHub, , 設定:, , Google Analytics 代碼, 如果使用者已登入,顯示/隱藏 Google Analytics...。
Extra Shortcodes 》, WordPress Pro plugins, Extra Shortcodes, Donate, GitHub, , , 簡碼:, , [extra_archives]– 按日期排序的月份檔案鏈結清單;, ...。