Skip to content

Instantly share code, notes, and snippets.

@cdils
Last active December 13, 2015 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cdils/4945286 to your computer and use it in GitHub Desktop.
Save cdils/4945286 to your computer and use it in GitHub Desktop.
Function to call in a custom 404 template for Genesis WordPress.
remove_action( 'genesis_loop', 'genesis_404' ); // Remove the default Genesis 404 content
add_action( 'genesis_loop', 'cd_custom_404' ); // Add function for custom 404 content
function cd_custom_404() {
if ( is_404() ) {
get_template_part('/partials/sitemap'); // Plop in our customized sitemap code
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment