WordPress /page/2 404 pagination problem – what to do?

I came across the /page/2 404 pagination problem and tried to find a solution. I’ve read some suggestions, but it didn’t help yet. Working: http://pandasnacozinha.com.br/bolos-doces-e-sobremesas/ Not working: http://pandasnacozinha.com.br/bolos-doces-e-sobremesas/page/2/ I’ve been trying to figure this out for hours. I understand WordPress assumes “page” is a post from the category “bolos, doces e sobremesas” since my permalink … Read more

How to determine if theres a next page

I am new to wordpress development, just trying to convert my HTML into a WordPress theme, I started with Chris Coyer’s blank theme. <div class=”navigation”> <div class=”next-posts”> <?php next_posts_link(‘&laquo; Older Entries’) ?> </div> <div class=”prev-posts”> <?php previous_posts_link(‘Newer Entries &raquo;’) ?> </div> </div> How can I output the div only if there is a next_posts_link(). I … Read more

Changing pagination list class

paginate_links() function returns unordered list with class named “page-numbers”. How can I change this class? EDIT Currently, I am using the band-aid method below. $return = paginate_links( $arg ); echo str_replace( “<ul class=”page-numbers”>”, ‘<ul class=”pagination”>’, $return ); Is there any better way? 4 paginate_links() doesn’t offer a parameter and there are no hooks – see … Read more

WP_Query Pagination on single-custom.php

What I am looking to do: Setup WP_Query pagination in a single-custom-post-type.php template file What I have done 1) Created a post type called “authors”. Each post within that post type is an individual author. 2) Standard edit post screen pages contain a dropdown which lists all posts (authors) from the authors custom post type. … Read more

How can i retrieve default post per page value? from settings->reading. And total number of posts?

I want to retrieve the default value of Post per page (the value that is set in settings->reading. I’ve looked around and so far I’ve only found ways to query it. problem is i dont want to change what was set i just want to retrieve it for pagination purposes. i thought of using $something->post_count.(i … Read more