views:

39

answers:

3

I recently started a blog site and wanted to give it a magazine look. I used Wordpress for my blog and used the Arthemia theme with it. I also changed the permalink structure to point to /%year%/%monthnum%/%day%/%postname%/ structure. Now the problem that i have is that the paging has stopped working on my home page. When i click on the next page link i get a 404 error. My /page/2 url does not show the next page. I check on google and found out that it was due to the redirection that is being performed due to the permalink change. The solution given was that i need to skip the url rewriting for the /page/* urls. This is the link to an article which said this http://www.yoursearchadvisor.com/blog/wordpress-next_posts_link-broken/ .

I was not able to follow this article and solve my problem, as i could not find the permanent redirect manager under the settings section as said in this article. Can somebody please guide me how to solve this problem.

I am using the latest Wordpress version and Arthemia theme with it.

I am using IIS 7 for running Wordpress. At least i know from google till now that i need to add some rules in the web.config file. But still no success.

Thanks.

A: 

Open your index.php file in your theme.

Replace:

  $page = (get_query_var('paged')) ? get_query_var('paged') : 1;

  query_posts("cat=-27,-28&paged=$page&posts_per_page=5"); ?>

With

$wp_query = new WP_Query query_posts("cat=-27,-28&paged=$paged&posts_per_page=5"); ?>

The problem is the navigation links only work with the variable $wp_query so it has to be used.

Aaron Harun
This is not the solution actually to my problem. My problem is about url rewriting on IIS 7.0. There has to be some change in the web.config file to correct this thing. I'll have to google more to get a solution to this problem.
Bootcamp
Did you try it? If the second page doesn't exist for the query wp thinks you made, it won't work.
Aaron Harun
A: 

I finally found a solution to my problem. Everything was setup correctly and the url-rewriting works fine on Godaddy windows economy account. The solution to my problem was simple. Follow these steps in case someone gets into the same problem.

Go to settings -> reading section

The blog pages show at most option is set to 10 by default. Change it to 5 and save the settings. This should resolve the problem. Paging works fine on my blog now, with permalinks set to /%year%/%monthnum%/%day%/%postname%/.

For a summary:

I use Godaddy windows economy account. Url-rewriting works fine on Godaddy account. The web.config file gets update fine whenever we make a change to the permalink structure. The paging bar on the home page may give a 404 error ( in my case it did ). Fix it using the steps above. I added a post regarding this on my blog too http://techaxe.com/2010/06/14/fix-for-404-error-while-navigating-to-the-next-page-in-wordpress/ . Hope this saves someone's time.

Bootcamp
A: 

add this to the end of your query:

.'&paged='.$paged
danixd