[WordPress] 外掛分享: Custom Post Archives

前言介紹

  • 這款 WordPress 外掛「Custom Post Archives」是 2010-11-08 上架。
  • 目前有 30 個安裝啟用數。
  • 上一次更新是 2011-04-29,距離現在已有 5119 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

spacemanspud |

外掛標籤

archives | templates | mod_rewrite | custom post types |

內容簡介

Custom Post Archives 這個外掛,連結了在 WordPress 3 中建立自訂文章類型和實際顯示這些文章的差距。透過這個外掛,你可以選擇為每個文章類型建立一個完全不同於博客的區域,其中包含你期望在 WordPress 中看到的所有功能。

對於每個自訂文章類型,如果你點擊「啟用」並輸入一個專屬的 slug 名,這個外掛就會讓你顯示文章類型專屬的:

檔案庫
日期檔案庫
作者檔案庫
類別檔案庫
RSS feeds

這個外掛同時提供了許多其他功能,完全整合你的自訂文章類型,其中包括:

為建立在 WordPress 3 中所建立的新選單區段新增一個選單選項(適用於支援的主題)
結合檔案庫(http://www.mysite.com/type1+type2/)
將文章類型新增至預設部落格
將文章類型新增至預設 RSS feed
新增文章類型支援到 wp_get_archives 函數
新增多個全域函數和過濾器以處理自訂文章類型(詳情請查閱功能和過濾器或外掛幫助)
在自訂分類目錄檔案庫上自動顯示相關的文章類型
擴展 WordPress 模板,允許主題作者進行彈性調整(詳情請查閱常見問題或外掛幫助)
在做出修改後自動清除重寫緩存
在建立的檔案庫頁面的本體類別中自動添加「blog-{post_type}」類別(對實作 body_class 函數的主題適用)

如需幫助和支援,外掛頁面的內容幫助部分提供了幫助;如果這還不夠,請務必查看常見問題和外掛論壇。

如果你有任何其他功能需要,我非常樂意聽取你的建議。請隨時發送消息或訪問論壇!

功能和過濾器

這個外掛建立了以下功能和過濾器。如需更詳細的說明,請查閱設定頁面內建的幫助部分。

功能

is_custom_archive({$post_type = false});

get_custom_archive_url($post_type);
get_custom_archive_label({$post_type = false});
get_custom_archive_link($post_type);

以下功能為進階用戶使用。每個功能會覆蓋外掛設置中相應文章類型的設置。

add_custom_archive($post_type,$slug,{$in_default = false,$in_rss = false});
remove_custom_archive($post_type);
add_to_default_archive($post_type);
remove_from_default_archive($post_type);
reset_custom_archive_to_default($post_type);

過濾器

cpa_rewrite_label

透過這個過濾器,你可以格式化 get_custom_archive_label() 返回的標籤。

cpa_templates

透過這個過濾器,你可以提供或更改 Custom Post Archives 搜索的模板列表。

原文外掛簡介

Custom Post Archives bridges the gap between creating Custom Post Types in WordPress 3, and actually displaying those posts. With this plugin, you have
the option of displaying a completely seperate blog-like section for each post type, complete with all the features you expect to see with WordPress.
For each custom post type, if you click “active” and enter a slug-name, this plugin will let you display post-type specific:

Archives
Date archives
Author archives
Category archives
RSS Feeds

This plug-in also provides many additional features to fully integrate your custom post types, including:

Adds a menu option to the new menu section created in WordPress 3 (for themes that support it)
Combined archives (http://www.mysite.com/type1+type2/)
Option to add post types to default blog
Option to add post types to default RSS feed
Adds post type support to wp_get_archives function
Adds multiple global functions and filters for working with custom post types (see Functions and Filters or Plugin Help for details)
Automatically displays the associated post type on custom taxonomy archives
Extends upon the WordPress templating, allowing for flexibility by theme authors (see FAQ or Plugin Help for details)
Automatically flushes the rewrite cache after modifications are detected
Automatically adds a “blog-{post_type}” type class to the body of the created archives (for themes that implement body_class())

For help and support, help has been built into the plug-in page’s contextual help section; be sure to check the FAQ and the plug-in forums if that doesn’t do it.
If there are any other features you’d like to see, I’m all ears. Feel free to send a message, or hit the forums!
Functions and Filters
The following function and filters are created by this plug-in. For more detailed descriptions, check the Help section built into the settings page.
Functions
is_custom_archive({$post_type = false});

get_custom_archive_url($post_type);
get_custom_archive_label({$post_type = false});
get_custom_archive_link($post_type);

The following functions are for advanced users. Each overrides the settings for the corresponding post_type in the plugin settings.
add_custom_archive($post_type,$slug,{$in_default = false,$in_rss = false});
remove_custom_archive($post_type);
add_to_default_archive($post_type);
remove_from_default_archive($post_type);
reset_custom_archive_to_default($post_type);

Filters
cpa_rewrite_label

Allows you to format the label returned by get_custom_archive_label().
cpa_templates

Allows you to provide or alter the list of templates Custom Post Archives searches for.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Custom Post Archives」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.0.1 | 1.0.2 | 1.0.3 | trunk |

延伸相關外掛(你可能也想知道)

  • Monkeyman Rewrite Analyzer 》這是一個了解你的重寫規則(“美麗連結”)的工具。如果你正在添加或修改規則,並想要了解它們的運作方式(或者為什麼它們不起作用),這個工具是必不可少的。,...。
  • Url Rewrite Analyzer 》了解 URL 重寫規則的運作方式可以非常有用。, 在 WordPress 原生中,無法分析 URL 結構是否正確。, 透過此外掛,您可以分析每個網址並查看哪些規則符合。, 注...。
  • Configurable Hotlink Protection 》透過阻擋未經授權的第三方網站中的視頻、音頻及其他文件,可輕鬆節省帶寬。, 特色, , 從常見的檔案副檔名列表選擇,並加入您自己的副檔名, 允許從多個授權網...。
  • Project Force Field 》Faison Zutavern、Jon Valcq、以及Emma Edgar,來自Orion Group LLC搭載全新外掛 Project Force Field,為WordPress帶來卓越的暴力攻擊保護機制。透過記錄失...。
  • WP File-Tree 》WP File-Tree是我自己開發的工具,它能夠幫助我的開發工作。, 網上有很多代碼片段、格式化和編輯插件,甚至也有一些文件管理插件。但是這些插件都不能將它們...。
  • CC-Cache 》CC-Cache 插件支援文章、頁面和任何公開的自訂文章類型的快取,包括單獨的和存檔頁面。, 它也支援「靜態頁面顯示」選項:首頁、文章頁和標準的最新文章列表。...。
  • ASPX WebRequest Rewriter 》如果您厭倦了 IIS 沒有提供永久連結,或者您沒有訪問主機上的 IIS 控制面板,那麼 wp-aspxrewriter 就是為您設計的!, 允許 URLS,例如:http://www.pynchon....。
  • Traffic Limiter 》Traffic Limiter 是一款非常實用的外掛,適用於具有大量媒體文件的部落格,以避免產生高流量成本。, 此外掛提供了三種流量限制方式:每日、每週和每月,如果...。

文章
Filter
Apply Filters
Mastodon