2015-12-11 228 views
0

This 是我的網站我不知道我的側邊欄沒有顯示在旁邊,它已經停止。請任何人都幫我解決這個問題。WordPress的側邊欄在帖子下面

的index.php

<?php 
/** 
* The main template file. 
* 
* This is the most generic template file in a WordPress theme 
* and one of the two required files for a theme (the other being style.css). 
* It is used to display a page when nothing more specific matches a query. 
* E.g., it puts together the home page when no home.php file exists. 
* 
* @link https://codex.wordpress.org/Template_Hierarchy 
* 
* @package Trevelle 
*/ 

get_header(); ?> 
<div class="background"> 
<div class="container padding-top"> 
     <div class="row" id="primary"> 
      <main id="content" class="col-sm-8"> 
       <?php if (have_posts()) : ?> 

      <?php /* Start the Loop */ ?> 
      <?php while (have_posts()) : the_post(); ?> 

       <?php 

        /* 
        * Include the Post-Format-specific template for the content. 
        * If you want to override this in a child theme, then include a file 
        * called content-___.php (where ___ is the Post Format name) and that will be used instead. 
        */ 
        get_template_part('template-parts/content', get_post_format()); 
       ?> 

      <?php endwhile; ?> 

      <?php the_posts_navigation(); ?> 

     <?php else : ?> 

      <?php get_template_part('template-parts/content', 'none'); ?> 

     <?php endif; ?> 
      </main> 
     <aside class="col-sm-4 lead text"> 
     <?php get_sidebar(); ?> 
     </aside> 
      </div> 
      </div> 
</div> 

<?php get_footer(); ?> 

,這裏是CSS,因爲其漫長的http://jsfiddle.net/go75571m/

+0

我們如何幫助沒有任何代碼?請閱讀[如何問](http://stackoverflow.com/help/how-to-ask) – davejal

+0

我已添加代碼# –

回答

0

編輯,所有新的答案:

你的主題CSS包含破壞了底層引導CSS一個設置。 找到下面的文件並打開它: 「/trevelle/wp-content/themes/trevelle/style.css」

上線#2492年至2497年文件中,您發現以下規律:

main { 
padding:25px; 
margin:10px 5px; 
color:black; 
line-height:30px; 
} 

在那裏,改變

margin10px 0;

這應該做的伎倆。我不知道這是否是主題中的一個小錯誤,或者如果錯誤行爲也是由其他內容引起的,但是現在,這會解決它。

這些5像素左緣和主元件的右只是一個有點太多:66,6667%的寬度(主)加33,3333%寬度(除)= 100%PLUS那些10px的剛剛獲得」 t適合周圍的容器...

+0

你能幫我弄明白嗎? –

+0

棒極了。謝謝 –

相關問題