我目前正在为我的网站使用Wordpress主题。决定创建自己的侧边栏,但其样式必须与原始侧边栏保持一致。我已经在函数中创建了一个新的侧栏。php使用register\\u边栏。我的主题创建边栏<?php get_sidebar(); ?>
没有别的了。在我的主题文件夹中,没有创建额外的侧栏php文件。我正在尝试使用<?php dynamic_sidebar( $index ); ?>
但这对我不起作用。我只是想add new widget to my second sidebar that I created and the style will be default.
Functions.php
if (function_exists(\'register_sidebar\')) {
register_sidebar(array(
\'name\'=>\'Sidebar-Aries\',
\'id\' => \'sidebar-aries\',
\'description\' =>\'Display all the contents of sidebar at Aries page.\',
\'before_widget\' => \'\',
\'after_widget\' => \'\',
\'before_title\' => \'\',
\'after_title\' => \'\',
));
}
Using dynamic sidebar,
<?php dynamic_sidebar(\'sidebar-aries\'); ?>