可能使用wordpress的朋友會發現我們使用自定左側欄時系統自帶的左側欄就不能顯示了,這兩幾乎不能同時存在了,下面本文章來給大家介紹Wordpress怎么讓自帶的側邊欄和自定義的側邊欄同時存在方法,有需要了解的同學可參考.
修改前,代碼如下:
- ul id=”sidebar”>
- php /* Widgetized sidebar, if you have the plugin installed. */
- if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) :
- li>
- h2>歸檔 此處省略部分代碼....
- /li>
- php }
- ul>
- php endif;
修改后代碼如下:
- php /* Widgetized sidebar, if you have the plugin installed. */
- if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) :
- php endif;
- h2>
- 歸檔
- 此處省略部分代碼….
其實也就是把如下代碼:
- php /* Widgetized sidebar, if you have the plugin installed. */
- if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) :
- 此處省略部分代碼…
關于動態sidebar的內容放到默認的前面,不讓它替換默認的就可以了.
新聞熱點
疑難解答
圖片精選