!
也想出现在这里? 联系我们
内容广告块

dynamic_sidebar()函数和is_dynamic_sidebar()函数-WP常用函数

释放双眼,带上耳机,听听看~!

dynamic_sidebar()函数用来支持小工具的调用的。

语法结构

<?php dynamic_sidebar($index); ?>

参数

$index:定义的小工具内边栏的名称或者ID

实例

<?php if (is_active_sidebar('left-sidebar' )):?>
	<ul id="sidebar">
		<?php dynamic_sidebar('left-sidebar' );?>
	</ul>
<?php endif;?>

is_dynamic_sidebar()函数用来验证注册的边栏是否添加小工具,如果侧边栏里面添加了任何一个小工具则返回true,否则为false

语法结构

<?php is_dynamic_sidebar(); ?>

实例

if (is_dynamic_sidebar('left-sidebar')){
    dynamic_sidebar('left-sidebar');
}

给TA打赏
共{{data.count}}人
人已打赏
PHP学习日记

register_sidebar()函数-WP常用函数

2020-12-13 12:49:03

PHP学习日记

register_widget()函数-WP常用函数

2020-12-14 7:36:11

版权声明 本站所发布的一切与破解相关的文章仅限用于学习和研究目的,请在下载后的24个小时之内,从您的电脑中彻底删除。所有资源均来自于网络,不得用于商业或者非法用途,否则一切后果请用户自负。如有问题请及时与我联系,QQ:526733428,或提交工单。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
购物车
优惠劵
今日签到
有新私信 私信列表
搜索

Warning: error_log(/www/wwwroot/zyansong.com/wp-content/plugins/spider-analyser/#log/log-0318.txt): failed to open stream: No such file or directory in /www/wwwroot/zyansong.com/wp-content/plugins/spider-analyser/spider.class.php on line 2900