2013-03-24 3 views
0

저는 WordPress에 대해 이해하지 못합니다. 어쩌면 이것은 어리석은 질문 일 것입니다.사용자 정의 페이지 템플릿 페이지 매기기

사용자 정의 페이지, 내 블로그 이름을 만듭니다. 모든 블로그 포스트가 입력되었습니다. 이 페이지 번호 매기기를 만드는 방법은 다음과 같습니다 < < Pre [1] [2] [3] ... 다음 >> >> 게시물 번호는 설정> 읽기> 블로그 페이지에서 결정됩니다. . 게시하다.

이것은 내 코드입니다.

<div class="page-content"> 
    <?php 
    $paged = (get_query_var('page')) ? get_query_var('page') : 1; 
    $args_recent_posts = array('post_type' => 'post', 'paged' => '$paged'); 
    $loop_recent_posts = new WP_Query($args_recent_posts); 
     if ($loop_recent_posts->have_posts()) : 
     function the_excerpt_max_charlength($charlength) 
      { 
      $excerpt = get_the_excerpt(); 
      $charlength++; 

      if (strlen($excerpt) > $charlength) 
       { 
       $subex = mb_substr($excerpt, 0, $charlength - 5); 
       $exwords = explode(' ', $subex); 
       $excut = - (strlen($exwords[ count($exwords) - 1 ])); 

      if ($excut < 0) 
       { 
       echo mb_substr($subex, 0, $excut); 
       } 
      else 
       { 
       echo $subex; 
       } 
       echo '...'; 
       } 
      else 
       { 
       echo $excerpt; 
       } 
      } 
     while ($loop_recent_posts->have_posts()) : $loop_recent_posts->the_post(); 
    ?> 
    <div class="entry-item"> 
    <div class="entry-image-col1"> 
     <div class="ch-item chi-mg"> 
     <?php if (has_post_thumbnail()) { the_post_thumbnail('page-image-1'); } ?> 
     <div class="ch-info"> <a href="<?php the_permalink(); ?>" class="detail">See Full Post</a> </div> 
     </div> 
    </div> 
    <div class="entry-info-col1"> 
     <div class="entry-meta"> 
     <div class="entry-date"> 
      <?php the_time('j M'); ?> 
     </div> 
     <div class="entry-author">Author : <span> 
      <?php the_author_posts_link(); ?> 
      </span></div> 
     <span class="entry-comment">Comment : <span> 
     <?php comments_number('no', 'one', '%'); ?> 
     </span></span> </div> 
     <div class="entry-content"> 
     <div class="entry-title"><a href="<?php the_permalink(); ?>"> 
      <?php the_title(); ?> 
      </a></div> 
     <p><?php echo substr(get_the_excerpt(), 0,250); ?></p> 
     <a href="<?php the_permalink(); ?>" class="link"><?php echo __('Read More &raquo;'); ?></a> </div> 
    </div> 
    </div> 
    <?php endwhile; endif; wp_reset_query(); ?> 
    <div class="navigation"> 
    <div class="alignleft"> 
     <?php next_posts_link('« Older Entries') ?> 
    </div> 
    <div class="alignright"> 
     <?php previous_posts_link('Newer Entries »') ?> 
    </div> 
    </div> 
</div> 

누군가가 나를 도와주기를 바랍니다. 감사합니다.

답변

-3

WP Paginate을 사용하십시오. 사용하기가 매우 쉽습니다.

+0

나를 기절 한 사람이라면 이유를 설명해 주시겠습니까? – ggdx