可能使用wordpress的朋友會(huì)發(fā)現(xiàn)我們使用自定左側(cè)欄時(shí)系統(tǒng)自帶的左側(cè)欄就不能顯示了,這兩幾乎不能同時(shí)存在了,下面本文章來(lái)給大家介紹Wordpress怎么讓自帶的側(cè)邊欄和自定義的側(cè)邊欄同時(shí)存在方法,有需要了解的同學(xué)可參考.
修改前,代碼如下:
- 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>
- 歸檔
- 此處省略部分代碼….
其實(shí)也就是把如下代碼:
- php /* Widgetized sidebar, if you have the plugin installed. */
- if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) :
- 此處省略部分代碼…
關(guān)于動(dòng)態(tài)sidebar的內(nèi)容放到默認(rèn)的前面,不讓它替換默認(rèn)的就可以了.
新聞熱點(diǎn)
疑難解答
圖片精選