小编use*_*432的帖子

WordPress Pagination与Page 1相同

我正在努力让WordPress分页工作.

我使用了不同的插件,并尝试调整pagination.php函数中的代码无济于事.

无论到目前为止我使用过什么插件或调整,第2页,第3页等都会显示相同的帖子.

这是pagination.php中的代码

<!-- Previous / More Entries -->        
<div class="mdnw_pagination">

<?php if(function_exists('wp_paginate')) :
    wp_paginate();
; else : ?>
<div class="p button"><?php next_posts_link(__('« Previous Posts', 'skeleton')); ?></div>
<div class="m button"><?php previous_posts_link(__('Next Posts »', 'skeleton')); ?></div>
<?php endif; ?>

</div>
<!-- </Previous / More Entries -->
Run Code Online (Sandbox Code Playgroud)

以下是主页的博客模板的代码:

<!-- THE POST QUERY -->
                        <?php 

                    wp_reset_query();

                    global $paged;
                    global $template_file;
                    $cat_string = '';
                    $format = '';

                    if( get_post_custom_values('blog_post_count') ) :  
                        $post_array = get_post_custom_values('blog_post_count');
                        $post_count = join(',', $post_array);
                    else : 
                        $post_count = -1; …
Run Code Online (Sandbox Code Playgroud)

php wordpress pagination wordpress-theming

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

pagination ×1

php ×1

wordpress ×1

wordpress-theming ×1