[WordPress] 外掛分享: Multisite Directory

首頁外掛目錄 › Multisite Directory
10+
安裝啟用
★★★☆☆
3.3/5 分(4 則評價)
3197 天前
最後更新
問題解決
WordPress 4.6+ v0.2.3 上架:2016-03-29

內容簡介

Multisite Directory 提供一個可定制的網路全站目錄,適用於使用 WordPress Multisite 的網站。您可以對網站進行分類,添加完整的描述和特色圖像等等。主題開發人員可以使用他們已熟悉的所有工具來自定義網站目錄的外觀和感覺。網誌作者可以使用高度可配置的短碼([site-directory])在任何短碼支援的地方顯示目錄。

當您的網站或網誌新增時,相對的目錄也會被增加。目錄由網路的主站點管理,但大多數對於子網站的更改(其他網誌)會自動更新目錄。在不影響網站本身的情況下,目錄中網站的許多部分可以被修改。這意味著超級管理員可以在目錄本身中使用自定義網站標誌、標語等,而不會更改網站的真正標誌、標語等。網路設定的其他選項也允許超級管理員調整設置。

網站目錄條目是在主站點中實現的分層自訂文章類型。這些頁面可以與自定義subsite_category分類法相結合。我們發現這種組合可以提供最大的靈活性,同時提供最緊密的 WordPress 核心功能集成。因此,您的安裝中不會添加新的表,也不會引入副作用。它只是正常地運行。

快速開始指南

安裝插件 之後,您需要:

作為超級管理員,轉到“我的站點”→“網路管理”→“網站”。注意側邊欄上的新“分類”鏈接。
建立一些分類!如果分類與位置相關(也許是您的組織的區域分會網站?),請務必點擊地圖進行地理標記。
在“分類”上面立即點擊“目錄”。這些頁面是單獨的目錄條目,不是網誌。將這些頁面分類,就像分類常規的 WordPress 頁面一樣來組織您的網站目錄。
轉到任何網站的“外觀”→“小工具”屏幕,並將“網路目錄小工具”添加到小工具區域。
如果您已經為一些網站類別加上地理標記,請從小工具選項中選擇“顯示為地圖”。(否則,保留“顯示為列表”)
點擊“儲存”,查看您的網誌,並享受您的新網站目錄!

查看截圖以獲取一些示例。
此外插件還提供了一些函數,供主題作者使用,以在主題中使用多站點網路目錄功能。本節記錄了這些函數。有關實現詳細信息,請參見此插件下的includes/functions.php文件。

get_site_directory_terms

獲取站點目錄中的所有分類。

@return array|false|WP_Error

Get site terms

獲取分配給網路目錄中特定網誌的分類。

@param int $blog_id
@return array|false|WP_Error

the_site_directory_logo

如果網站目錄條目已有特色圖像,則打印網站的自定義標誌或目錄條目的特色圖像。

@param int $blog_id 選填。要獲取其標誌的網站 ID。默認值是當前目錄條目的值。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.2.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Multisite Directory」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Multisite Directory provides a customizable Network-wide site directory for WordPress Multisite installations. You can categorize subsites in your Network, add full-length descriptions and featured images to them, and more. Theme developers can customize the look and feel of the site directory using all the tools they’re already familiar with. Blog authors can use a highly-configurable shortcode ([site-directory]) to display the directory anywhere shortcodes are supported.
Each time a new site or blog is added to your Network, a corresponding entry in the site directory is added, too. The directory is managed from the Network’s main site, but most changes to the subsites (other blogs) automatically update the directory. Many parts of a given site’s appearance in the directory can be modified without affecting the site itself. This means a Super Admin can use a custom site logo, tagline, and so on in the directory itself, without changing the site’s actual logo, tagline, and so on. Additional options in the Network Settings → Network Directory section allows Super Admins to tweak the bells and whisltes, such as keeping Directory Entry titles in sync with Site Name changes.
Site directory entries are implemented as a hierarchical custom post type in the main site. These pages can be categorized with a custom subsite_category taxonomy. We’ve found that this combination allows maximum flexibility while providing the tightest integration with existing WordPress core features. As a result, no new tables are added to your install, and no side effects are introduced. It Just Works.(TM)
Quickstart guide
After installing the plugin, you’ll want to:

As a Super Admin, go to My Sites → Network Admin → Sites. Notice the new “Categories” link on the sidebar.
Create some categories! If the category relates to a location (maybe it’s a site for a regional chapter of your organization?), be sure to click the map to geotag it.
Click on “Directory,” immediately above “Categories.” These pages are the individual directory entries, not the blogs. Categorize these pages as you would regular WordPress Pages to organize your Site Directory.
Go to any site’s Appearance → Widgets screen, and add a “Network Directory Widget” to a widget area.
If you’ve geotagged some of your Site Categories, choose “Display as map” from the widget options. (Otherwise, leave it on “Display as list.”)
Click Save, view your blog, and enjoy your new Site Directory!

Check out the Screenshots for a few examples.
This plugin provides a number of functions to Theme authors so that they can make use of the Multisite Network Directory features in their themes. This section documents those functions. For implementation details, see this plugin’s includes/functions.php file.
get_site_directory_terms
Gets all categories in the site directory.

@return array|false|WP_Error

Get site terms
Gets the categories assigned to a given blog in the network directory.

@param int $blog_id
@return array|false|WP_Error

the_site_directory_logo
Prints the site’s custom logo or the site directory entry’s featured image, if it has one.

@param int $blog_id Optional. The ID of the site whose logo to get. Default is the current directory entry’s site’s logo.
@param string|int[] $size
@param string|string[] $attr
@return void

延伸相關外掛

文章
Filter
Mastodon