Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Wordress Pagination Problem

Posted on 2011-03-07
14
Medium Priority
?
693 Views
Last Modified: 2012-05-11
I am a wreck right now... I just put so many hours tweaking this theme.

http://azwm.com

First, let me say this: I have searched the forum for answers,
I have disabled the WP-Navi plug-in,
I have set my permalinks to default,
I have changed category names and more...

Whether I use page-navi plug-in or not, the same thing happens:

As soon as pagination gets to the LAST page for a category, it gets a 404 error.

So, http://azwm.com/category/mortgage-questions/page/2/

works fine. But there are 3 pages.

http://azwm.com/category/mortgage-questions/page/3/ brings me to a dead link / 404 error.

In the category mortgage-news, there are two pages of posts. So, of course, this works: http://azwm.com/news/mortgage-news/

But this is dead:
http://azwm.com/news/mortgage-news/page/2/

I would be SO GRATEFUL for an answer. Thank you in advance.
0
Comment
Question by:mikegeorge2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 3
  • +1
14 Comments
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 35061569
It's possible that your theme or plugin code might have some thing that affect the  internal page number calculation or the main loop variables. Maybe a custom query?
0
 

Author Comment

by:mikegeorge2
ID: 35061617
The only plug-in that I feel could be a problem is called WP Page-Navi. However, when I disabled the plug-in, I still had the same problem.
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 35061667
Try changing the theme entirely, maybe to the default twentyten and see if the problem goes away. If so, the problem should be theme related and you will need to check the post/loop related template files.
0
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 23

Expert Comment

by:jeremyjared74
ID: 35062394
I believe it is your permalink structure.

If you go to Settings>Permalinks, try clicking on the default settings and then update. This will let you see if ti is in fact a permalink problem. If it fixes it, but you would still like to use custom permalinks, let me know and I will help you troubleshoot why it isn't working.
0
 

Author Comment

by:mikegeorge2
ID: 35063630
Thanks for responding guys / gals.

@jeremyjared74: I changed the permalink structure to "default" and it is still doing it... So frustrated!
0
 

Author Comment

by:mikegeorge2
ID: 35063645
@jeremyjared74: Since I changed the permalinks and it did not fix the problem at all, I went back to my old structure.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 35063679
Have you tried turning on WordPress debug mode?

You won't want to leave it on, but it may help you troubleshoot the problem.

Here is how:
Add this to your WP-config file:
if ( isset($_GET['debug']) && $_GET['debug'] == 'debug')
  define('WP_DEBUG', true);

Open in new window

Next you can check any page by adding "?debug=debug".
EXAMPLE:
http://azwm.com/category/mortgage-questions/page/2/?debug=debug

Open in new window


Alternatively you can use the WordPress plugin that the WordPress theme repository uses when allowing or rejecting themes:
http://wordpress.org/extend/plugins/theme-check/
0
 

Author Comment

by:mikegeorge2
ID: 35065453
I did exactly what you posted and now my whole site is down. I don't know how to fix it or what to do. I copied and pasted the code exactly.

Any ideas? Thanks.
0
 

Author Comment

by:mikegeorge2
ID: 35065657
Okay, I got it working again. It had something to do with comments not being commented out of the wp-config file because I used a text editor and it affected word wrap. I opened the CSS in Dreamweaver and hit return a few times and everything is back up.

So I am just going to add:

if ( isset($_GET['debug']) && $_GET['debug'] == 'debug')
  define('WP_DEBUG', true);

anywhere in the code, right?
0
 

Author Comment

by:mikegeorge2
ID: 35065722
Okay, I did it... But no bugs are showing up... Not that I can see.

Nothing is showing up actually. Just another 404 error.

http://azwm.com/news/mortgage-questions/page/3/?debug=debug

If I go to page 2, or "the second from the last page", I still do not have a problem, but I still don't see bug information.

http://azwm.com/news/mortgage-questions/page/2/?debug=debug
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 35065796
I just wanted to make sure...

Do you have enough articles or posts for there to be a third page?
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 35067787
maybe be the calculation of number of available pages is wrong?
Starting from 1 instead of 0 like things...
0
 

Author Comment

by:mikegeorge2
ID: 35071558
Right now, there are 12 posts under the category "mortgage questions." There are 5 posts on page 1 and page 2 and then page 3 is 404 not found.

This is very unusual right? It seems like there would be a simple solution.
0
 
LVL 31

Accepted Solution

by:
gwkg earned 2000 total points
ID: 35089942
Try changing the 'Blog pages show at most' Settings > Reading and see if it clears it up.

If not, look here: http://wordpress.org/support/topic/default-navigation-is-giving-a-404-error
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
WordPress is constantly evolving, and with each evolution appears to get better and better.  One of the big drawbacks prior to version 3 was that there was no way to be able to set up a custom menu from the backend. The Old Way Adding menus is…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question