Support » Plugin: WP-PageNavi » Navigation wont work pages.

  • Resolved cloudstr210



    First thanks for reading this question.

    I tried to create a custom page template to show archive on one category that I want to show.

    But when I try to go to the second page, the url will change to /page/2 but the content remains the same.

    This is the page (not archive/category page) that I created to show all the post under category 14.

    I wanted to show all of the post of this category:

    To show it in this page:

    But when I click on the page 2 of this page. It will show the content of page 1.

    These are my codes:

    <?php /* Template Name: Motivational Quotes */ ?>
    <?php get_header(); ?>
    		<section id="primary" class="site-content">
    			<div id="content" role="main">
    			<?php if ( have_posts() ) : ?>
    				<?php rewind_posts(); ?>
    	<header class="entry-header">
    		<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', '_s' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    	</header><!-- .entry-header -->
    	<div class="entry-content">
    	</div><!-- .entry-content -->
    <br />
    				<?php /* Start the Loop */ ?>
    				<?php query_posts('cat=14'); ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						get_template_part( 'content', get_post_format() );
    				<?php endwhile; ?>
    <?php wp_reset_postdata(); ?>
    				<?php getpagenavi(); ?>
    				<?php else : ?>
    				<?php get_template_part( 'no-results', 'archive' ); ?>
    			<?php endif; ?>
    			</div><!-- #content -->
    		</section><!-- #primary .site-content -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Navigation wont work pages.’ is closed to new replies.