Code à placer dans le fichier functions.php de votre thème :

[pastacode lang= »php » message= » » highlight= » » provider= »manual » manual= »%2F**%0APas%20de%20404%20pour%20la%20pagination%20qui%20n%E2%80%99existe%20pas%20ou%20plus%0A%C2%A9%20Julio%20Potier%20BoiteAweb%20-%20Modifi%C3%A9%20par%20Daniel%20Roch%20et%20correction%20par%20Willy%0ABahuaud%20(ne%20fonctionnait%20pas%20sur%20la%20page%20d%E2%80%99accueil)%0A*%2F%0Afunction%20seomix_template_redirect_no_404_pagination()%20%7B%0A%2F%2FR%C3%A9cup%C3%A9ration%20de%20la%20variable%20%22paged%22%0A%24paged%20%3D%20get_query_var(%20’paged’%20)%3B%0A%24page%20%3D%20get_query_var(‘page’)%3B%0A%2F%2FSi%20nous%20sommes%20sur%20une%20page%20404%20avec%20une%20page%20sup%C3%A9rieure%20%C3%A0%200%0Aif(%20is_404()%20%26%26%20(%20%24paged%20%7C%7C%20%24page%20)%20%3E%200%20)%3A%0Aglobal%20%24wp_rewrite%3B%0A%24url%20%3D%20preg_replace(%20%22%23%24wp_rewrite-%3Epagination_base%2F%24paged(%2F%2B)%3F%24%23%22%2C%20 »%2C%0A%24_SERVER%5B’REQUEST_URI’%5D%20)%3B%0Awp_redirect(%20%24url%2C%20301%20)%3B%0Adie%3B%0Aendif%3B%7D%0Aadd_action(‘template_redirect’%2C%20’seomix_template_redirect_no_404_pagination’%20)%3B »/]