Wordpress实现自带的侧边栏和自定义的侧边栏同时存在的方法


本文整理自网络,侵删。

本文实例讲述了Wordpress实现自带的侧边栏和自定义的侧边栏同时存在的方法。分享给大家供大家参考。具体如下:

可能使用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的内容放到默认的前面,不让它替换默认的就可以了.

希望本文所述对大家的WordPress建站有所帮助。


标签:WordPress

相关阅读 >>

wordpress中限制非管理员用户在文章后只能评论一次

upupw 更新 64 位 apache 系列 php 7.0 正式版

详解wordpress中分类函数wp_list_categories的使用

wordpress php 分页代码

详解wordpress开发中wp_title()函数的用法

wordpress 静态化设置 windows主机伪静态去除index.php方法

wordpress thickbox 添加“查看原图”效果代码

wordpress给文章生成二维码的方法

wordpress实现退出登录后跳转到指定页面的方法

wordpress中自动激活插件的实现方法

更多相关阅读请进入《wordpress》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...