cupaball
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Fixing WordPress
In reply to: The Loop and PaginationGot it working!
Forum: Fixing WordPress
In reply to: The Loop and PaginationThank 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">←</span> Older posts', 'twentyeleven' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></div> </nav><!-- #nav-above --> <?php endif; ?> </section>Forum: Fixing WordPress
In reply to: The Loop and PaginationNice! 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">←</span> Older posts', 'twentyeleven' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</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/
Forum: Fixing WordPress
In reply to: The Loop and PaginationThanks, 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
In reply to: fatal error call undefined function get_headerAll 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)