2014-07-19 3 views
0
<article <?php post_class(); ?>> 
     <header> 
     <div class="container"> 
     <div class="row"> 
      <div class="col-sm-6 col-md-3"> 
      <div class="thumbnail"> 
       <?php if(has_post_thumbnail()) : ?> 
        <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" > 
        <?php the_post_thumbnail(); ?> 
         </a> 
        <?php endif; ?> 
       <div class="caption"> 
        <h3 class="thumbnail-label"><a class="" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> 
        <?php get_template_part('templates/entry-meta'); ?> 
        <div class="entry-summary"> 
        <?php the_excerpt(); ?> 
         </div> 
     </header> 
       </div> 
       </div> 
      </div> 
      </div> 
     </div> 
    </article> 

나란히 나란히 정렬하는 데 문제가 있습니다. 그들이하는 일은 서로의 위에 겹쳐서 놓을 수는 없습니다. 여기트위터 부트 썸네일 썸네일이 나란히 있습니다.

당신은 너무 일찍 <header> 태그를 닫는 것으로 보인다

답변

1

http://getbootstrap.com/components/#thumbnails처럼 그 모습을 가정하는 것이다. 대신에이 마크 업을 시도해보십시오

<article <?php post_class(); ?>> 
    <header> 
     <div class="container"> 
      <div class="row"> 
       <div class="col-sm-6 col-md-3"> 
        <!-- Your thumbnail code goes here. --> 
       </div> 
      </div> 
     </div> 
    </header> 
</article> 

참고 :를 사용하면 미리보기가 적재 왜 그 설명 할 루프 내부에이 코드를 사용하는 경우.

+0

메신저 정적 전면 page..is에 그들을 사용 : 당신이 얻을 지금

{outside_element} {looped_element} {looped_element} {looped_element} {/outside_element} 

을 루프를 사용할 경우 해결 방법이 있습니다. – user3814779

0

<article> 태그에 반복되는 요소가 들어 있다고 가정하면 너무 많은 내용을 반복하고 있습니다. 마크 업 읽어야 3 반복을 통해 실행

{outside_element} 
    {loop} 
     {looped_element} 
    {/loop} 
{/outside_element} 

당신에게 줄 것이다 :

{outside_element} 
    {looped_element}   
{/outside_element} 
{outside_element} 
    {looped_element}   
{/outside_element} 
{outside_element} 
    {looped_element}   
{/outside_element}