WP Manifestindependent plugin directory
manifest / content / page-for-404

Page for 404

Allows a specific page to be used to populate 404 content.

by Happy Prime · github.com/happyprime/page-for-404 · website

3stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/happyprime/page-for-404/archive/refs/heads/develop.zip

From the readme

Page for 404 Page for 404 is a WordPress plugin that allows you to configure one of a site's pages as the source of content for its 404 page. The setting is handled similar to the default pageonfront and pageforposts options maintaned by WordPress. Once the plugin is installed and activated, an option is available to set the pagefor404 setting through Settings - Reading. Once a page is configured as the page for 404, the plugin tries to find a matching PHP template that will handle the request in this order: In the site's active theme: page-for-404.php page-{the-configured-page-slug}.php page-{the-configured-page-id}.php And, if none of those is available, in this plugin: templates/404.php The template included in this plugin uses markup that matches that of the TwentyTwenty theme provided with WordPress. To add support for the plugin in your theme (or child theme), make sure one of the first three template files is available and add \PageFor404\setuppostglobal(); at the top, preferrably above getheader();. This will cause the global $post variable to be populated with data from the page that has been configured through the plugin. Note that the standard loop w

Read the full README on GitHub →