Pagnation on Author Page
-
Hey all,
Im currently working with WP Page numbers and I cant seem to get the author page to work correctly. The page numbers show up ok, but when you go to the next page, you get a 404 error. I believe I’m having a similar problem to the problem here: https://www.ads-software.com/support/topic/pagination-for-custom-post-types
Im using a custom theme that I am building from scratch and Im using “pretty links” so links look like: https://clientsite.com/author/username/
The URL https://clientsite.com/author/username/page/1/ works fine and will take you to the authors first page of posts but https://clientsite.com/author/username/page/2/ renders a 404 error.
the query im running is below…
global $wpdb; $author_id=$post->post_author; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array('paged'=>$paged,'posts_per_page'=>2, 'author'=>$author_id); query_posts($args);
Any help would be appreciated! Thanks in advance!
- The topic ‘Pagnation on Author Page’ is closed to new replies.