2016-08-22 127 views
0

我正在尋找幫助,從我的wordpress網站刪除「垃圾」小部件。網站的主題是Zerif Lite,到目前爲止每一頁上都沒有側邊欄,但是當我做一個新帖子的時候,有很多垃圾(邊欄,誰發佈了它,什麼時候,如何標記和重放選項)。 我試圖從外觀 - >小部件中刪除它,它並沒有工作和小部件的主題定製鎖定爲精簡版。刪除側邊欄,並重播wordpress帖子頁

因此,對於一開始我第一個想刪除側邊欄,其中包括搜索,存檔和工作至今meta.Only事情是消隱的sidebar.php包括:

<div id="secondary" class="widget-area" role="complementary"> 

    <?php if (! dynamic_sidebar('sidebar-1')) : ?> 

     <aside id="search" class="widget widget_search"> 

      <?php get_search_form(); ?> 

     </aside> 

     <aside id="archives" class="widget"> 

      <h2 class="widget-title"><?php _e('Archives', 'zerif-lite'); ?></h2> 
      <ul> 
       <?php wp_get_archives(array('type' => 'monthly')); ?> 
      </ul> 

     </aside> 

     <aside id="meta" class="widget"> 

      <h2 class="widget-title"><?php _e('Meta', 'zerif-lite'); ?></h2> 

      <ul> 
       <?php wp_register(); ?> 
       <li><?php wp_loginout(); ?></li> 
       <?php wp_meta(); ?> 
      </ul> 

     </aside> 

    <?php endif; ?> 

</div><!-- #secondary --> 

然而,當我這樣做側邊欄被刪除了,但它佔用的空間是空白的,這意味着帖子本身只使用2/3頁。

讓你看到你的自我這裏是鏈接到網站(其在塞爾維亞,忽略):

website和:

new post, this you can only see with this link,its where problem is

所以,如果有人能幫助我消除所有並使頁面清潔,我會非常偉大。由於

回答

0

的問題是CSS

這裏是解決方案(只如果你不你的網站的任何地方使用邊欄)

更改內容容器的寬度,也許現在被設定爲70%(剩下的30%用於側邊欄)至100%。

如果飛機上用工具條,然後你需要在你的functions.php設置條件類:

function custom_body_classes($classes) { 
// Adds a class of nosidebar to sites without active sidebar. 
if (! is_active_sidebar('sidebar-1')) { 
$classes[] = 'nosidebar'; 
} 
return $classes; 
} 
add_filter('body_class', 'custom_body_classes'); 

那麼只有用新的類定義的CSS。例如:

.content .nosidebar { 
width:100% 
} 

乾杯

相關問題