3
我想添加两个额外的动态侧边栏到我的Wordpress主题上方的博客文章相邻的方式对齐方式是从右到左,任何帮助以前赞赏。如何将动态边栏添加到WordPress主题?
我想添加两个额外的动态侧边栏到我的Wordpress主题上方的博客文章相邻的方式对齐方式是从右到左,任何帮助以前赞赏。如何将动态边栏添加到WordPress主题?
你能更具体一点吗?以下是如何让你的主题widget准备就绪:
的functions.php
// register sidebars
if (function_exists('register_sidebar'))
if (function_exists('register_sidebar'))
register_sidebar(array('name'=>'Left Sidebar', //Name your sidebar
'description' => 'These widgets will appear in the left sidebar.',
'before_widget' => '<div class="widget">', // Displays before widget
'after_widget' => '</div>', // Displayed after widget
'before_title' => '<h3>', //Displays before title, after widget start
'after_title' => '</h3>' //Displays after title
));
然后把这个地方你的侧边栏会出现:
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Name Here')) : ?>
<!-- static content goes here if sidebar is inactive -->
<?php endif; ?>
+1,伟大的回答,你好@Jared,我们如何才能在页面中获取dynamic_sidebar()的标题? – SagarPPanchal 2014-07-25 06:31:22