手机
当前位置:查字典教程网 >CMS教程 >WordPress >Wordpress实现自带的侧边栏和自定义的侧边栏同时存在的方法
Wordpress实现自带的侧边栏和自定义的侧边栏同时存在的方法
摘要:本文实例讲述了Wordpress实现自带的侧边栏和自定义的侧边栏同时存在的方法。分享给大家供大家参考。具体如下:可能使用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文章标题为空时其它内容代替的方法

wordpress获取某个栏目链接地址的方法

WordPress自定义表情及其路径的方法

wordpress修改固定链接后301重定向的方法

WordPress 评论者超链接实现重定向跳转的方法

WordPress自定义多个边栏的方法

多个WordPress站点使用同一数据库的方法

wordpress去掉自带的logo或者左侧栏的菜单方法

wordpress自带的缓存功能使用介绍

WordPress中非插件实现嵌套回复效果的方法

精品推荐
分类导航