Getting multiple pages to work
-
Hey, my website’s blog: https://www.at-first-sight.ca/blog currently doesn’t show the correct posts on page 2, or any sequential pages after that. It shows the same loop on the first page. I’m sure there’s something small I’ve missed, but I can’t seem to find it.
Here’s what I have in the content area on that page:
<?php if (have_posts()) : ?> <?php query_posts('category_name=blog&showposts=8'); ?> <?php while (have_posts()) : the_post(); ?> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> <?php the_time('l, F jS, Y') ?> <?php the_content() ?> <?php endwhile; ?> <!-- End Blog Posts --> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <?php } ?> <!-- Next / Back Links --> <?php posts_nav_link(); ?> <!-- Page Not Found --> <?php else : if ( is_category() ) { // If this is a category archive printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false)); } else if ( is_date() ) { // If this is a date archive echo("<h2>Sorry, but there aren't any posts with this date.</h2>"); } else if ( is_author() ) { // If this is a category archive $userdata = get_userdatabylogin(get_query_var('author_name')); printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name); } else { echo("<h2 class='center'>No posts found.</h2>"); } get_search_form(); endif; ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Getting multiple pages to work’ is closed to new replies.