404 sur la pagination category.php
-
-
Partagez du code avecnous.Sinon,ilest assez difficile de comprendre votreproblème réel.Share some code with us. Other wise it is pretty tough to figure out your actual problem.
- 0
- 2017-02-16
- CodeMascot
-
@the_dramatist J'aimis àjourma question.Iln'y a rien deplus.Celafonctionnait avant demodifier la structure du Permalien de `/% category%/%postname%/` à `/blog/% category%/%postname%/`@the_dramatist I've updated my question. There's nothing more. It worked before I modify Permalink structure from `/%category%/%postname%/` to `/blog/%category%/%postname%/`
- 0
- 2017-02-16
- Fabien Charrasse
-
1 réponses
- votes
-
- 2017-02-16
Merci à ceci et cecij'aipu adapter la solution àmonproblème.
Solution:
add_action( 'init', 'wpa58471_category_base' ); function wpa58471_category_base() { add_rewrite_rule( 'blog/([^/]+)/page/(\d+)/?$', 'index.php?category_name=$matches[1]&paged=$matches[2]', 'top' ); add_rewrite_rule( 'blog/([^/]+)/(feed|rdf|rss|rss2|atom)/?$', 'index.php?category_name=$matches[1]&feed=$matches[2]', 'top' ); }
Thanks to this and this i was able to adapt the solution to my problem.
Solution:
add_action( 'init', 'wpa58471_category_base' ); function wpa58471_category_base() { add_rewrite_rule( 'blog/([^/]+)/page/(\d+)/?$', 'index.php?category_name=$matches[1]&paged=$matches[2]', 'top' ); add_rewrite_rule( 'blog/([^/]+)/(feed|rdf|rss|rss2|atom)/?$', 'index.php?category_name=$matches[1]&feed=$matches[2]', 'top' ); }
-
10x!m'afaitgagnerbeaucoup detemps :)10x! saved me lots of time :)
- 0
- 2020-03-22
- Roee Yossef
mysite.com/blog
=> Travailmysite.com/blog/page/2
=> Travailmysite.com/blog/cat
=> Travailmysite.com/blog/cat/postname
=> Travailmysite.com/blog/cat/page/2
=> 404 :-(/blog/%category%/%postname%/
Category.php:
Pagination desfonctions ():
Pourquoiest-ce quej'obtiens 404 avecpagination?
Modifier:
mysite.com/blog/cat/feed
ne fonctionnepasnonplus