Skip to content

Instantly share code, notes, and snippets.

@mustardBees
Created June 16, 2014 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustardBees/41e0d2fc166b34ad8e90 to your computer and use it in GitHub Desktop.
Save mustardBees/41e0d2fc166b34ad8e90 to your computer and use it in GitHub Desktop.
<?php
/**
* Prevent Yoast SEO redirect 302 instead 404 on date archives
*
* @author Henry Ruhl
* @link http://goo.gl/s5d0Lo
*/
function iweb_remove_pagination_overflow_redirect() {
remove_action( 'wp', array($GLOBALS['wpseo_front'], 'pagination_overflow_redirect'), 99 );
}
add_action( 'init', 'iweb_remove_pagination_overflow_redirect' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment