首页 WordPress函数大全 dynamic_sidebar()

dynamic_sidebar()

2020-05-01 / 2041阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

dynamic_sidebar( int|string $index = 1 )

Display dynamic sidebar.

描述

By default this displays the default sidebar or ‘sidebar-1’. If your theme specifies the ‘id’ or ‘name’ parameter for its registered sidebars you can pass an id or name as the $index parameter. Otherwise, you can pass in a numerical index to display the sidebar at that index.

参数

$index

(int|string)
(Optional)
Index, name or ID of dynamic sidebar.

Default value: 1

返回

(bool) True, if widget sidebar was found and called. False if not found or not called.

大家谈论
    我的见解