[WordPress] 外掛分享: DMG Custom Menu Widget

首頁外掛目錄 › DMG Custom Menu Widget
10+
安裝啟用
尚無評分
3493 天前
最後更新
問題解決
WordPress 3.1+ v1.0 上架:2016-08-24

內容簡介

顯示以「外觀」>「選單」頁面建立的選單為連結列表。

包括高級選項以添加CSS樣式、修改標題和添加每個連結之前和之後的HTML /文本。

替換內置的選單小工具(WP_Nav_Menu_Widget)。

有一個鉤子可以過濾標題:dmg_custom_menu_widget_title。

例如,要在單個頁面或文章上更改標題,您可以將此添加到您的functions.php文件中:

function myTitleFilter( $title )
{
if( is_singular() )
{
return "<strong>$title</strong>";
}
else
{
return $title;
}
}
add_filter( 'dmg_related_pages_widget_title' , 'myTitleFilter');

更多信息可以在http://dancoded.com/wordpress-plugins/custom-menu-widget/找到。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

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

原文外掛簡介

Displays a menu created on the ‘Appearance > Menus’ page as a list of links.
Includes advanced options to add CSS styles, modify the title and add HTML/ Text before and after each link.
Replaces the built in Menus Widget (WP_Nav_Menu_Widget).
A hook is available to filter the title: dmg_custom_menu_widget_title.
For example, to change the title on a single page or post, you could add this to your functions.php file:
function myTitleFilter( $title )
{
if( is_singular() )
{
return "$title";
}
else
{
return $title;
}
}
add_filter( 'dmg_related_pages_widget_title' , 'myTitleFilter');

More information about this plugin can be found at http://dancoded.com/wordpress-plugins/custom-menu-widget/.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon