Title: cupaball's Replies | WordPress.org

---

# cupaball

  [  ](https://wordpress.org/support/users/cupaball/)

 *   [Profile](https://wordpress.org/support/users/cupaball/)
 *   [Topics Started](https://wordpress.org/support/users/cupaball/topics/)
 *   [Replies Created](https://wordpress.org/support/users/cupaball/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/cupaball/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/cupaball/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/cupaball/engagements/)
 *   [Favorites](https://wordpress.org/support/users/cupaball/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [The Loop and Pagination](https://wordpress.org/support/topic/the-loop-and-pagination/)
 *  Thread Starter [cupaball](https://wordpress.org/support/users/cupaball/)
 * (@cupaball)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/the-loop-and-pagination/#post-2966278)
 * Got it working!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [The Loop and Pagination](https://wordpress.org/support/topic/the-loop-and-pagination/)
 *  Thread Starter [cupaball](https://wordpress.org/support/users/cupaball/)
 * (@cupaball)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/the-loop-and-pagination/#post-2966276)
 * Thank you very much! Solve my issue. In case anyone needs the final code here
   it is:
 *     ```
       <section id="vid_content">
       <?php
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts(array('posts_per_page'=>3,'paged'=>$paged));
       if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       <?php echo'<article class="vids">';
       	echo'<h3>';
       	the_title();
       	echo'</h3>';
       	the_content();
       	echo'
       	<p>#thatshitgray <a href="http://www.twitter.com/grayareabrand">@grayareabrand</a> |
       	<a href="http://www.facebook.com/grayareabrand">Facebook </a></p>';
       	echo'</article>'; ?>
       <?php endwhile; else: ?>
       <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
       <?php endif; ?>
   
       <?php
       global $wp_query;
   
       if ( $wp_query->max_num_pages > 1 ) : ?>
         <nav id="<?php echo $nav_id; ?>">
           <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
           <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>
           <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>
         </nav><!-- #nav-above -->
       <?php endif; ?>
   
       </section>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [The Loop and Pagination](https://wordpress.org/support/topic/the-loop-and-pagination/)
 *  Thread Starter [cupaball](https://wordpress.org/support/users/cupaball/)
 * (@cupaball)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/the-loop-and-pagination/#post-2966270)
 * Nice! So here is what I have
 *     ```
       <section id="vid_content">
       <?php
       query_posts( 'posts_per_page=3' );
       if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       <?php echo'<article class="vids">';
       	echo'<h3>';
       	the_title();
       	echo'</h3>';
       	the_content();
       	echo'
       	<p>#thatshitgray <a href="http://www.twitter.com/grayareabrand">@grayareabrand</a> |
       	<a href="http://www.facebook.com/grayareabrand">Facebook </a></p>';
       	echo'</article>'; ?>
       <?php endwhile; else: ?>
       <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
       <?php endif; ?>
   
       <?php
       global $wp_query;
   
       if ( $wp_query->max_num_pages > 1 ) : ?>
         <nav id="<?php echo $nav_id; ?>">
           <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
           <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>
           <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>
         </nav><!-- #nav-above -->
       <?php endif; ?>
   
       </section>
       ```
   
 * When I click the next button, the page navigates to the next page but it shows
   the same post. Weird right? Here is the page so you can make sure I’m not crazy.
   [http://www.grayareabrand.com/blog/](http://www.grayareabrand.com/blog/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [The Loop and Pagination](https://wordpress.org/support/topic/the-loop-and-pagination/)
 *  Thread Starter [cupaball](https://wordpress.org/support/users/cupaball/)
 * (@cupaball)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/the-loop-and-pagination/#post-2966254)
 * Thanks, chandanonline4u. My only issue now is what is the paging code? I tried
   to copy from the 2012 code, but I’m not sure which code. Also, if I use `query_posts();`
   will the number of post be based on the what is in the reading admin panel?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [fatal error call undefined function get_header](https://wordpress.org/support/topic/fatal-error-call-undefined-function-get_header-1/)
 *  [cupaball](https://wordpress.org/support/users/cupaball/)
 * (@cupaball)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-call-undefined-function-get_header-1/#post-1812480)
 * All I have to say is that I having been for this answer for a week! thanks!

Viewing 5 replies - 1 through 5 (of 5 total)