Having issues with "Previous-posts-link" at the bottom of my pages.
-
Hi All. I’m having issues with the previous post links at the bottom of my pages. I have tried using the wordpress php:
<?php next_posts_link('? Older Entries') ?> <?php previous_posts_link('Newer Entries ?') ?>
I have also tried a Plugin version using PageNavi
<?php wp_pagenavi(); ?>
Example hereHowever, I am having the same problem with both techniques. If I choose older poses it loads page two, but the posts stay the same.
You can test it on both of the links above.Has anyone got any idea why this might be happening.
Below is the code from one of the the page-template using the wordpress php:
<?php /* Template Name: Food and Travel - Eat */ get_header(); ?> <div id="content" class="narrowcolumn" role="main"> <div class="homeHolder"> <ul id="myRoundabout"> <?php $catID = 188; if ($catID) { $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=$catID&paged=$paged"); } ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <li class="item1"><a>"> <span class="img-title"><?php the_title(); ?></span><?php the_post_thumbnail(); ?></a> <?php endwhile; ?> <?php else : ?> <!-- <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php /*?><?php get_search_form(); ?><?php */?>--> <?php endif; ?> </div> <div class="home-hr"><img src="https://www.macsmagazine.com/wp-content/themes/macs/_assets/hr-line.jpg"/></div> <div class="homepage-heading"><a href="https://www.macsmagazine.com/living/diet-and-fitness/">Eat</a></div> <div class="home-hr"><img src="https://www.macsmagazine.com/wp-content/themes/macs/_assets/hr-line.jpg"/></div> <div class="sub-stories-holder"> <?php if ($catID) { $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=26&paged=$paged"); } ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <div id="sub-post"> <div class="post-content"> <div class="post-thumbnail"> <a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail(); ?></a> </div> <div class="post-copy"> <div class="post-title"> <a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </div> <span style="text-decoration:none;"><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read more ></a></span> </div> </div> </div> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('? Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries ?') ?></div> </div> <?php else : ?> <!-- <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php /*?><?php get_search_form(); ?><?php */?>--> <?php endif; ?> </div> </div> <?php get_sidebar('foodtravel'); ?> <?php get_footer(); ?>
[mod: the above code is partially broken – don’t use it for copy/paste]
Regards
Gary
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Having issues with "Previous-posts-link" at the bottom of my pages.’ is closed to new replies.