Skip to content

Instantly share code, notes, and snippets.

View marlonamancio's full-sized avatar

Marlon Amâncio marlonamancio

View GitHub Profile
@marlonamancio
marlonamancio / gist:3166226
Created July 23, 2012 21:04
Debug WordPress 404 issues (permalinks, rewrite rules, etc.)
/* Produces a dump on the state of WordPress when a not found error occurs */
/* useful when debugging permalink issues, rewrite rule trouble, place inside functions.php */
ini_set( 'error_reporting', -1 );
ini_set( 'display_errors', 'On' );
echo '<pre>';
add_action( 'parse_request', 'debug_404_rewrite_dump' );
function debug_404_rewrite_dump( &$wp ) {