[WordPress] 外掛分享: Simple Page Specific Sidebars

首頁外掛目錄 › Simple Page Specific Sidebars
WordPress 外掛 Simple Page Specific Sidebars 的封面圖片
100+
安裝啟用
★★★★
4.3/5 分(4 則評價)
4874 天前
最後更新
問題解決
WordPress 3.0+ v2.14.1 上架:2011-05-22

內容簡介

Page Specific Sidebars 將在每個頁面中新增一個核取方塊,讓您選擇哪些頁面需要有獨特的側邊欄 (Sidebar)。

一旦您在頁面編輯器中啟用特定於該頁面的側邊欄,將自動為該頁面創建小工具區域,您可以自由地自定義它。

您還可以指定此外掛功能是否會用頁面特有的側邊欄替換您的通用側邊欄,或者僅將頁面特定的側邊欄添加到現有側邊欄上。

注意事項

此外掛沒有內建樣式且不包含原生樣式; 它的目的是使用您現有佈景主題的樣式。

這是一個最小化的外掛,將功能放在前面。 如果您想擴充它,或者希望我們在以後的版本中擴充它,請隨時聯繫我們或在此外掛的支援論壇中發送反饋意見。

使用方法

啟用並使用即可。 有幾個過濾器供自訂:

$location = apply_filters( 'page_sidebar_location', 'side' );

$priority = apply_filters( 'page_sidebar_priority', 'high' );

這些過濾器允許您更改「編輯頁面」檢視中元框的位置和優先順序。

$home_slug = apply_filters( 'page-sidebar-homeslug', $home_slug )

如果您的首頁別名不同於「home」,請使用此過濾器:

注意:任何有自訂迴圈取回多個文章的頁面都會防礙此外掛。由於某些原因,它總是將文章 ID 輸出為頁面上的最後一個文章輸出。另外,首頁很可能是 WordPress 中最新的部落格文章,因此我創建了一個檢查。它將獲取首頁 ID 並使用首頁 ID 取得其側邊欄(使用 is_frontpage() 檢查)。

如果您希望增加一些過濾器或動作,請聯繫我們。 http://www.ivycat.com/contact

路線圖

新增排序功能? (需要很長時間).
建議一個新功能 ...

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.14.1) 或搜尋安裝

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

原文外掛簡介

Page Specific Sidebars adds a checkbox to every page allowing you to choose which pages should have a unique sidebar.
Once you enable a page-specific sidebar in the page editor, a widget area will automatically be created for that page and you can customize it as you like.
You can also specify whether the plugin replaces your generic sidebar with the page-specific sidebar, or simply adds your page-specific sidebar on to the existing sidebar.
Notes
Plugin has no built-in styling does not contain native styles; it’s meant to use the styles of your existing theme.
This is a minimal plugin, placing function over form. If you would like to extend it, or would like us to extend it in later versions, feel free to contact us, or post feedback in this plugin’s support forum.
Usage
Simply activate and go. There are a couple filters for customization:
$location = apply_filters( 'page_sidebar_location', 'side' );

$priority = apply_filters( 'page_sidebar_priority', 'high' );

These allow you to change the location and priority of the metabox on the “Edit Page” view.
$home_slug = apply_filters( 'page-sidebar-homeslug', $home_slug )

Use this filter if your home page slug is different from “home” :
NOTE: Any page that has a custom loop pulling in multiple posts will throw this plugin off. For some reason it always outputs the post ID as the last
post output on the page. Also, the homepage is most likely the latest blog posts in WordPress so I created a check. It will get the Home page ID and
use the Home page ID to get its sidebar. (uses is_frontpage() ) to check.
Contact us if you want some more filters or actions added. http://www.ivycat.com/contact
Road Map

Add ordering feature? (long down the road).
Suggest a feature…

延伸相關外掛

文章
Filter
Apply Filters
Mastodon