Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate 404 page template #16

Open
joemaller opened this issue Oct 11, 2021 · 0 comments
Open

Integrate 404 page template #16

joemaller opened this issue Oct 11, 2021 · 0 comments

Comments

@joemaller
Copy link
Member

Source template which just wraps the default page template:

That will need to be a bit more durable and have some fallbacks in case the page.php template doesn't exist. It should also defer to any existing 404.php template.

This should also expose a wp\Init\NotFound (find a better name) function which would encapsulate all the 404.php logic.

This would then give us a template which looked something like this:

<?php
/**
 * Template name: 404 Page
 */

namespace IdeasOnPurpose;

new WP\Init\NotFound();

get_header();

get_template_part('page');

get_footer();

Possible references:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant