2012-10-04 179 views
-1

我是WordPress的新手。我想制作two sidebars。一个在left,另一个在right hand side。我想用twenty-eleven这个主题,然后用customise那个。所以任何帮助都将非常可观。如何在wordpress twentyeleven主题中添加两个侧边栏

+0

边栏左边是不太可能,我真的不会推荐它。但看看这个让你开始..http://wordpress.org/support/topic/twentyten-how-to-switch-right-sidebar-to-left – JonathanRomer

+0

@JonathanRomer thyanks的答复,但我想两个在帖子两侧的侧栏不要将右侧栏移动到左侧。 –

回答

2

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

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

谢谢你的回复。我只是通过这个问题,这是有点类似于我的问题http://stackoverflow.com/questions/12727269/adding-two-sidebars-in-wordpress-child-theme 所以你能告诉我如何解决在这个问题中被问到的硬代码部分? –

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; 
} 
相关问题