如何在wordpress Twentyeleven主题中添加两个侧边栏

时间:2012-10-04 08:03:31

标签: wordpress wordpress-theming

我是WordPress的新手。我想制作two sidebars。一个位于left,另一个位于right hand side。我想使用twenty-eleven主题,然后使用customise。所以任何帮助都会非常明显。

3 个答案:

答案 0 :(得分:2)

非常简单方便,首先使用两个侧边栏进行设计,一个在左侧,一个在右侧,然后在左侧和右侧栏上调用特定的小部件。

<?php dynamic_sidebar (''WIDGET AREA NAME); ?>

答案 1 :(得分:1)

将它放在Index.php或主页

<div class="sidebar_left" id="sidebar_left">

<?php if ( is_active_sidebar( 'sidebar-left' ) ) : ?>
        <div id="secondary" class="widget-area" role="complementary">
            <?php dynamic_sidebar( 'sidebar-left' ); ?>
        </div><!-- #secondary -->
    <?php endif; ?>


</div>

和CSS就在这里

#sidebar_left{
    float:left;
    /*width: 303px;*/
    border: 2px solid #A2A2A2;
    display: block;
    float: left;
    height: auto;
    margin: -532px 0 -62px -123px
    padding: 0;
    top: auto;
    width: auto;
}

答案 2 :(得分:0)

你应该:

你会发现很多教程,例如: this one

相关问题