2012-10-04 85 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; 
} 
相關問題