內容簡介
吸引人的前端主題切換器/預覽,讓您可以示範所有主題,並處理菜單和小工具。
示範網站
用法
在任何頁面或文章中添加短碼 [theme_catalog_select],即可顯示一個吸引人的主題列表,可供預覽
短碼屬性
錯誤(true、false、null)預設值:false - 只顯示帶有錯誤的主題。 true為只顯示錯誤、false為只顯示非錯誤,null為顯示兩者皆可。閱讀更多
允許(true、false、'site'、'network'、null)預設值:true - 僅顯示允許的主題。閱讀更多
截圖(true、false、null)預設值:true - 僅顯示有截圖的主題。 true為僅顯示截圖主題、false為僅顯示無截圖主題,null為顯示兩者皆可
延遲載入(true、false、整數)預設值:20 - 是否使用延遲載入。 true為始終使用延遲載入、false為永不使用延遲載入,整數為如果至少找到指定數量的結果才使用延遲載入。
顯示截圖(true、false)預設值:true - 顯示截圖
顯示名稱(true、false)預設值:true - 顯示名稱
顯示作者(true、false)預設值:true - 顯示作者
顯示版本(true、false)預設值:true - 顯示版本
顯示描述(true、false)預設值:true - 顯示描述
菜單
可以基於每個主題創建/映射菜單,並創建全局菜單,如果未為所選主題映射,則會使用全局菜單。
可以設置單個主題菜單。 如要這樣做:
在“設置 ->主題目錄”下打開“在管理員中應用”
使用您在選擇器上的頁面切換到所需的主題。
轉到“外觀 ->菜單”並按照您的意願設置菜單
對於您想要個別映射的所有主題,重複步驟2和4。
在“設置 ->主題目錄”下關閉“在管理員中應用”
可以通過創建名為“theme_catalog_menu_1”“theme_catalog_menu_2”等的菜單來創建全局主題菜單。 菜單將按照遇到的順序填充到加載的主題中。
小工具
小工具僅可以基於每個主題來處理。 如要這樣做:
在“設置->主題目錄”下打開“在管理員中應用”
使用您在選擇器上的頁面切換到所需的主題。
進入“外觀->小工具”並按照您的意願設置小工具
對於您想要個別映射的所有主題,重複步驟2和4。
在“設置->主題目錄”下關閉“在管理員中應用”
問題
iThemes Builder主題和Artisteer主題(我確信還有其他主題)繞過WordPress的wp_nav_menu函數,因此無法使用全局菜單。 您必須使用個別的菜單映射。
待辦事項
添加“包含”和“排除”屬性
創建一個工具,用於群映射主題菜單。
允許基於每個主題或全局創建和映射側邊欄(小工具區域)
外掛標籤
開發者團隊
原文外掛簡介
Attractive front-end theme switcher/preview allowing demo of all themes, with menu and widget handling.
Demo Site
Usage
Add the shortcode [theme_catalog_select] to any page or post to display an attractive list of themes available to preview
Shortcode Attributes
errors (true,false,null) default:false – Display only themes with errors. true to only show errors, false to only show non errors, null to show both Read More
allowed (true,false,’site’,’network’,null) default:true – Display only allowed themes Read More
screenshots (true, false, null) default:true – Display only themes that have screenshots. true to only show themes with screenshots, false to only show themes without screenshots, null to show both
lazyload (true,false,integer) default:20 – whether to use lazyload. true to always use lazyload, false to never use lazyload, integer to use lazyload if at least specified amount of results are found.
display_screenshot (true,false) default:true – Display screenshots
display_name (true,false) default:true – Display names
display_author (true,false) default:true – Display authors
display_version (true,false) default:true – Display versions
display_description (true,false) default:true – Display description
Menus
Menus can be created/mapped on a per theme basis and global menus can be created which will be used in the event that the menus are not mapped for the selected theme.
Individual Theme Menus can be set up. To do so :
Turn on “Apply in admin” under Settings -> Theme Catalog
Use the page you have the selector on to switch to the desired theme.
Go to Appearance -> Menus and set up menus as you wish
Repeat steps 2 & 4 for all the themes you want to individually map.
Turn off “Apply in admin” under Settings -> Theme Catalog
Global Theme Menus can be created by creating menus named “theme_catalog_menu_1” “theme_catalog_menu_2” etc. Menus will be populated into loaded theme in the order they are encountered.
Widgets
Widgets can only be handled on a per theme basis. To do so :
Turn on “Apply in admin” under Settings -> Theme Catalog
Use the page you have the selector on to switch to the desired theme.
Go to Appearance -> Widgets and set up widgets as you wish
Repeat steps 2 & 4 for all the themes you want to individually map.
Turn off “Apply in admin” under Settings -> Theme Catalog
Issues
iThemes Builder themes and Artisteer themes (and I’m sure there are others) bypass WordPress’ wp_nav_menu function, so can not use global menus. You must use individual menu mapping for these.
TO DO
Add ‘include’ & ‘exclude’ attributes
Build a tool for bulk mapping theme menus.
Allow sidebars (widget areas) to be created and mapped on a per theme basis or globally
