Support » Fixing WordPress » PageNavi and Hueman [Pagination Works, but show the same page]

  • Resolved playeriva

    (@playeriva)


    Hey guys,
    I’m pretty new to this platform, and I’m getting this error.

    So, basically I created an custom page to show some category posts, and exclude some categories from the page.

    The PageNavi works, it redirects to the /page/2/ but show the same content as /page/1/

    If anyone can give an advice on how to properly fix the issue.
    I’m pretty sure, my code has something wrong so, if anyone can help I really appreciate

    My custom page code is:

    <?php /*
    Template Name: ListPostsInCategoryThatHasSameNameAsPage
    */ ?>
    
    <?php get_header(); ?>
    
    <section class="content">
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php if( get_post_format() ) { get_template_part('inc/post-formats'); } ?>
    <?php the_content(); ?>
    <?php endwhile; else: endif; ?>
    
    <div class="pad group" style="margin-right: 10px; margin-left: 12px;">
    
    <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <article <?php post_class(); ?> style="margin-bottom: 20px; !important;">
    <div class="post-inner group" style="background-color: #0d0d0d;border-radius: 15px; padding: 12px;">
    
    <?php if( get_post_format() ) { get_template_part('inc/post-formats'); } ?>
    <div class="clear"></div>
    
    <div class="entry">
    <div class="entry-inner" style="line-height: 0.9em !important;">
    <?php the_content(); ?>
    
    <?php wp_link_pages(array('before'=>'<div class="post-pages">'.__('Pages:','hueman'),'after'=>'</div>')); ?>
    </div>
    <div class="clear"></div>
    </div><!--/.entry-->
    
    <div class="post-meta group">
    <p class="post-date" style="margin-left: 10px;font-size: 12px !important;">Postado por Recanto das Poesias e Artes no dia <?php the_time('j \d\e F \d\e Y');?> às <?php the_time('g:i:s A');?> <br>Marcadores: <?php the_category(' / '); ?></p>
    </div><!--/.post-meta-->
    
    <div style="background-color: #151516; margin-right: auto; margin-left: auto; border-radius: 20px; margin-top: 10px; margin-bottom: 10px;">
    <p style="text-align: center; color: #999999 !important;">Compartilhar:</p>
    <?php
    $url = get_permalink($post->ID);
    $title = get_the_title($post->ID);
    echo do_shortcode('[easy-social-share buttons="facebook,twitter,google,blogger,mail" counters=0 style="button" template="tiny-retina" fullwidth="no" url="'.$url.'" text="'.$title.'"]');
    echo do_shortcode('[easy-social-like facebook="true" google="true" skinned="false" skin="flat" counters=true align="center"]');
    ?></div>
    </div><!--/.post-inner-->
    </article><!--/.post-->	
    
    <?php if($i % 2 == 0) { } $i++; endwhile; ?>
    <?php endif; ?>
    
    <?php get_template_part('inc/pagination'); ?>
    
    </div><!--/.pad-->
    
    </section><!--/.content-->
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    and the website with the page, to see whats happens is:
    http://recanto-das-poesias-e-artes.com/textos-com-formatacao/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PageNavi and Hueman [Pagination Works, but show the same page]’ is closed to new replies.