camden.d.lee
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: Second page doesn't show new postsIt worked! Thank you so much alchymyth.
Forum: Fixing WordPress
In reply to: Second page doesn't show new postsThanks for the help from both of you. I have updated with that code, but I am still having the issue. Here is where I am at now
<?php query_posts('category_name=news&posts_per_page=5&paged='.get_query_var('page')); ?> <?php while ( have_posts() ) : the_post() ?> <?php /* Create a div with a unique ID thanks to the_ID() and semantic classes with post_class() */ ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php /* an h2 title */ ?> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'hbd-theme'), the_title_attribute('echo=0') ); ?> " rel="bookmark"><?php the_title(); ?> »</a></h2> <?php /* The entry content */ ?> <div class="entry-content"> <?php echo content(100); ?> <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'hbd-theme' ) . '&after=</div>') ?> </div><!-- .entry-content --> </div><!-- #post-<?php the_ID(); ?> --> <?php /* Close up the post div and then end the loop with endwhile */ ?> <?php endwhile; ?> <?php /* Bottom post navigation */ ?> <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> <div id="nav-below" class="navigation"> <?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'hbd-theme' )) ?> <?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'hbd-theme' )) ?> </div><!-- #nav-below --> <?php } ?>
When I click the more posts button, It still displays the same posts but it only happens when I query posts within the “news” category. If I don’t use that category, I don’t run into the issue.
Thanks for the help!
Forum: Fixing WordPress
In reply to: Second page doesn't show new postsNot sure what part of that will help.
The problem is the
<?php query_posts('category_name=news,news&showposts=5&paged=1'); ?>
When I just have
<?php while ( have_posts() ) : the_post() ?>
Without trying to display a specific category, it works fineForum: Fixing WordPress
In reply to: Second page doesn't show new postsThe website is https://camdenlee.com/mothership
Viewing 4 replies - 1 through 4 (of 4 total)