自定义帖子类型的Wordpress分页不起作用

自定义帖子类型的Wordpress分页不起作用,wordpress,Wordpress,我用自定义分类法创建了自定义帖子类型,并将它们显示在主题的index.php上。当我使用wordpress分页时,它会出现在第2页上,没有显示任何内容,它会出现在“找不到”页上!。 以下是代码 add_action( 'init', 'register_success_stories' ); function register_success_stories(){ register_post_type( 'sajid-photos', array( 'label' =>

我用自定义分类法创建了自定义帖子类型,并将它们显示在主题的index.php上。当我使用wordpress分页时,它会出现在第2页上,没有显示任何内容,它会出现在“找不到”页上!。 以下是代码

add_action( 'init', 'register_success_stories' );
function register_success_stories(){
    register_post_type( 'sajid-photos', array(
      'label' => 'My Photos',
      'singular_label' => 'My Photo',
      'description' => 'Manage phots.',
      'public' => TRUE,
      'publicly_queryable' => TRUE,
      'show_ui' => TRUE,
      'query_var' => TRUE,
      'rewrite' => TRUE,
      'capability_type' => 'post',
      'hierarchical' => FALSE,
      'menu_position' => NULL,
      'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'custom-fields', 'revisions'),
      'menu_position' => 5,
      'rewrite' => array(
        'slug' => 'sajid-photo-work',
        'with_front' => FALSE,
      ),
      'labels' => array(
        'name' => __( 'My Photos' ),
        'singular_name' => __( 'My Photos' ),
        'add_new' => __( 'Add New Photo' ),
        'add_new_item' => __( 'Add New Photo' ),
        'edit' => __( 'Edit Photo' ),
        'edit_item' => __( 'Edit Photo' ),
        'new_item' => __( 'New Photo' ),
        'view' => __( 'View Photo' ),
        'view_item' => __( 'View Photo' ),
        'search_items' => __( 'Search Photos' ),
        'not_found' => __( 'No Photo Found' ),
        'not_found_in_trash' => __( 'No Photo found in Trash' ),
        'parent' => __( 'Parent Photo' ),
    )
    ));
    flush_rewrite_rules( false );
}
register_taxonomy('sajid-album', 'sajid-photos', array(
  'label' => 'Albums',
  'singular_label' => 'Album',
  'public' => TRUE,
  'show_tagcloud' => FALSE,
  'hierarchical' => TRUE,
  'query_var' => TRUE,
  'rewrite' => array('slug' => 'sajid-album' )
));
以下是在主页上显示特定德克萨斯州的帖子的代码

<?php
                wp_reset_query();
                global $post;
                query_posts( array( 'post_type' => 'sajid-photos', 'sajid-album' => 'home-page-photos','paged' => $paged, 'posts_per_page' => 1 , 'paged' => get_query_var('paged')) );
                if ( have_posts() ){
                while ( have_posts() ) : the_post();
                    unset($thumb_big);
                    $thumb_big = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
                    $thumb_big_url = $thumb_big['0'];
                    ?>
                    <a href="<?php echo $thumb_big_url; ?>" title="<?php the_title(); ?>" data-gal="prettyPhoto[1]" class="gallery-image"><img src="<?php echo $cfs->get('upload_thumbnail'); ?>" alt="<?php the_title(); ?>"></a>
                    <?php
                endwhile;
                }   //  end of if ( have_posts() )
                theme_paginate();
                wp_reset_query();
              ?>

而且它的术语URL也不起作用,当我点击术语时,它会进入未找到的页面。 请帮我解决这个问题。 非常感谢你。
网站URL对于初学者来说是

,理想情况下,你不会在wordpress网站上为你的主页分页。但是,如果希望在静态首页上获取当前页面,则需要查找
get\u query\u var('page')
变量,而不是“paged”。您正在使用
theme_paginate()它出现在分页链接中,我不确定它是如何构建链接的,所以这可能是您首先开始的地方