wordpress 添加小工具分类
生活随笔
收集整理的這篇文章主要介紹了
wordpress 添加小工具分类
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
register_sidebar( array('name' => __( '默認側邊欄', 'Bing' ),//側邊的名字'id' => 'sidebar-1',//側邊欄的 ID,注冊多個側邊欄的時候不要重復'description' => __( '側邊欄的描述', 'Bing' ),//側邊欄的描述,會在后臺顯示'before_widget' => '<div class="widget %2$s">',//側邊欄里的小工具的開頭代碼,可以在里邊使用 %2$s 來調用小工具的 ID,實現給每個小工具添加不同的樣式'after_widget' => '</div>',//側邊欄里的小工具的結尾代碼'before_title' => '<h3 class="widget-title">',//側邊欄里的小工具的標題的開頭代碼'after_title' => '</h3>'//側邊欄里的小工具的標題的結尾代碼
) );/后臺主題小工具
/// https://www.cnblogs.com/MY0101/p/7110226.htmlregister_sidebar( array('name' => '網站頂部-語言切換','id' => 'top_sidebar','before_widget' => '<div class="topbar-rt" >','after_widget' => '</div>','before_title' => '<h3 class="widget-title">','after_title' => '</h3>',) );register_sidebar( array('name' => '網站底部版權','id' => 'footer_sidebar','before_widget' => '<div class="topbar-rt" >','after_widget' => '</div>','before_title' => '<h3 class="widget-title">','after_title' => '</h3>',) );register_sidebar( array('name' => '左側邊欄-不帶菜單','id' => 'left_sidebar_no_menu','before_widget' => '<li id="views-3" class="widget widget_views">','after_widget' => '</li>','before_title' => '<h3 class="widget-title">','after_title' => '</h3>',) );register_sidebar( array('name' => '左側邊欄-帶菜單','id' => 'left_sidebar_menu','before_widget' => '<aside id="%1$s" class="widget %2$s">','after_widget' => '</aside>','before_title' => '<h3 class="widget-title">','after_title' => '</h3>',) );
?
?
參考:https://www.cnblogs.com/MY0101/p/7110226.html
?
總結
以上是生活随笔為你收集整理的wordpress 添加小工具分类的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JS判断字符串变量是否含有某个字串的方法
- 下一篇: Ubuntu环境下Android反编译a