My site is enerating some code for older/newer posts on the category page, but when you click "older" the link does not work. it is generating /blog/page/2 from /blog/
Tried a few plugins (WPnavi, Category pagination fix, and a few others that were the first and 2nd rated under "pagination" search) but it didn't work
Tried a bunch of the codes I found on wordpress.org
Only one post category, not a custom post.
But nothing seems to be working...
Here is the code
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<A href="<?php the_permalink() ?>" class="noborder"><?php if ( has_post_thumbnail() ) { the_post_thumbnail('thumbnail'); } ?></a></div>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?> "rel="bookmark"><?php the_title(); ?></a>
<section class="entry-content">
<?php $content = get_the_content();
$content = strip_tags($content);
echo substr($content, 0, 250);
?>... <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="button">Full Post</a>
<?php endwhile; endif; ?>
</article>
<nav>
<div class="6u"><?php next_posts_link(sprintf( __( '%s', 'blankslate' ), '<span class="button">← Older Posts</span>' ) ) ?>
<div class="6u"><?php previous_posts_link(sprintf( __( '%s', 'blankslate' ), '<span class="button">→ </span>' ) ) ?></div>
</nav>
get_posts
is not meant to paginated. I'm not saying it cannot be paginated, it can, but it requires a lot of unnecessary overheads.query_posts
, which is a pure evil function as it break everything. I personally think there are much better info here than in the codex........