2013-01-14 4 views
2

다음은 내 home.php의 코드입니다. 작동하지만 페이지 매김이 아닙니다. 무엇을 잘못하고 있습니까? 아니면 작동시키기 위해 코드를 작성하는 더 좋은 방법이 있습니까? 도와주세요. 아주 사용하기 쉬운 -Wordpress - 페이지 매김이 작동하지 않습니까?

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 

echo "<div id=\"featured_post\">"; 
    query_posts(array ('post_type'=>'post', 'paged' => $paged, 'category_name' => $featured_cat_name, 'posts_per_page' => 4, 'ignore_sticky_posts'=>1)); 
    $fcount = 1; 
    if (!$paged): 
     while (have_posts() && $fcount < 5) : the_post();?> 
      <div id="post-<?php the_ID(); ?>" class="view"><?php 
       $format = get_post_format(); 
       if (false == $format): 
       featured_posts_first(); 
       else : 
       featured_posts_test(); 
       endif;      
      echo "</div>"; 
     $fcount++; 
     endwhile; 
    else : 
     while (have_posts()) : the_post();?> 
      <div id="post-<?php the_ID(); ?>" class="<?php if (get_post_format() == audio): echo 'audio-isa view'; else : echo 'view'; endif; ?>"><?php 

       featured_posts_test(); 

      echo "</div>"; 
     endwhile; 
    endif; 
echo "</div>"; 
    //get posts navigation 
    global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1) { 
    thematic_navigation_below(); 
    } 
    wp_reset_query(); 

답변

1

난 당신 같은 simple pagination 플러그인의 페이지 매김을 사용하는 것이 좋습니다.

this

관련 문제