rewrite rules - Pagination: tagstag_name?paged=2 gives a 404 error

I need to paginate an archive page. Pagination works perfectly fine for everything except tagcategory archives. Basical

I need to paginate an archive page. Pagination works perfectly fine for everything except tag/category archives. Basically if I use /tags/tag_name/?paged=2 it gives me a 404 error. But if I use /tags/tag_name/?page=2 it works fine. Unfortunately I need to use /tags/tag_name/?paged=2

I reckon it has to do with rewriting. These are the existing rules WP has:

tags/([^/]+)/page/?([0-9]{1,})/?$   index.php?tag=$matches[1]&paged=$matches[2] post_tag
tags/([^/]+)/?$ index.php?tag=$matches[1]   post_tag

I have tried all the combinations of rewrite rules I could think of to make /tags/tag_name/?paged=2 work. No success. How can I make it work?

===

What I found out it is only ?paged=2 that gives me trouble. /tags/tag_name/?abc=2 doesn't give a 404. Makes no sense to me.

===

ok, so what I decided to do is unset $_GET['paged'] in functions.php and set it's value back in header.php. Then I changed all the code to avoid using WP's get_query_var. Works for now.

I need to paginate an archive page. Pagination works perfectly fine for everything except tag/category archives. Basically if I use /tags/tag_name/?paged=2 it gives me a 404 error. But if I use /tags/tag_name/?page=2 it works fine. Unfortunately I need to use /tags/tag_name/?paged=2

I reckon it has to do with rewriting. These are the existing rules WP has:

tags/([^/]+)/page/?([0-9]{1,})/?$   index.php?tag=$matches[1]&paged=$matches[2] post_tag
tags/([^/]+)/?$ index.php?tag=$matches[1]   post_tag

I have tried all the combinations of rewrite rules I could think of to make /tags/tag_name/?paged=2 work. No success. How can I make it work?

===

What I found out it is only ?paged=2 that gives me trouble. /tags/tag_name/?abc=2 doesn't give a 404. Makes no sense to me.

===

ok, so what I decided to do is unset $_GET['paged'] in functions.php and set it's value back in header.php. Then I changed all the code to avoid using WP's get_query_var. Works for now.

Share Improve this question edited Feb 17, 2013 at 13:20 user1158010 asked Feb 17, 2013 at 12:24 user1158010user1158010 113 bronze badges 2
  • Why are you trying to create rewrite rules for tags, WordPress does that for you already. – t31os Commented Apr 30, 2013 at 15:54
  • Try one time to save permalink in admin side.May it fix issue. – Bindiya Patoliya Commented Jul 18, 2014 at 7:08
Add a comment  | 

4 Answers 4

Reset to default 1

I change the pagination param from "paged" to "page" and works! Dont give 404 more =)

Changing the permalink structure work for me!!! look:

the permalink was like this in custome structure: /index.php/%year%/%monthnum%/%day%/%postname%/

then i change it to: Day and name( just select de radio button) and it will look like this: /%year%/%monthnum%/%day%/%postname%/

i tried and then it works!!!

Thanks to God!

God Bless You guys! seya

Try changing the Blog pages show at most in settings->reading . This solved the problem I had with pagination which is almost the same.

A very simple way is to insert in your functions.php:

if ( isset( $_GET['paged'] ) )
    $_GET['page'] = $_GET['paged'];

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744877870a4598656.html

相关推荐

  • rewrite rules - Pagination: tagstag_name?paged=2 gives a 404 error

    I need to paginate an archive page. Pagination works perfectly fine for everything except tagcategory archives. Basical

    1天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信