Title: shawesome Contextual 404 – Different 404 Pages by Post Type and URL
Author: shawesome
Published: <strong>November 14, 2026</strong>
Last modified: November 14, 2026

---

Search plugins

![](https://ps.w.org/shawesome-contextual-404/assets/banner-772x250.png?rev=3802185)

![](https://ps.w.org/shawesome-contextual-404/assets/icon-256x256.png?rev=3802185)

# shawesome Contextual 404 – Different 404 Pages by Post Type and URL

 By [shawesome](https://profiles.wordpress.org/shawesome/)

[Download](https://downloads.wordpress.org/plugin/shawesome-contextual-404.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/shawesome-contextual-404/#description)
 * [Reviews](https://wordpress.org/plugins/shawesome-contextual-404/#reviews)
 *  [Installation](https://wordpress.org/plugins/shawesome-contextual-404/#installation)
 * [Development](https://wordpress.org/plugins/shawesome-contextual-404/#developers)

 [Support](https://wordpress.org/support/plugin/shawesome-contextual-404/)

## Description

A missing product should lead to the shop, a missing blog post to the blog. shawesome
Contextual 404 shows the 404 page that fits the requested URL.

**404 pages**

Create 404 pages under _shawesome  Contextual 404_ in the tab _404 Pages_, with 
the block editor or with Elementor. The column _Used for_ shows where each page 
applies. They use the page template of your theme, so the title is shown as a heading.
They have no public URL and are not part of the sitemaps of WordPress.

**Assign them**

In the tab _Settings_ you assign a 404 page to every public post type, and a default
for everything else. For a request, the plugin checks in this order:

 1. **Path rules** – a prefix or a regular expression, in the order you entered them.
 2. **Query vars** – what the rewrite rules of WordPress recognized: a post type, a
    taxonomy of a post type, a date.
 3. **URL prefixes** – the rewrite slug or the archive of a post type, e.g. `/shop/`.
 4. **Parent pages** – URLs below an existing page belong to the post type Pages.
 5. **Default** – the page selected as the default, otherwise the 404 page of your 
    theme.

With the permalink structure `/%postname%/`, posts and pages both live in the root.
A URL such as `/xyz` does not reveal what was requested, so the default applies.

The field _Test URL_ below the path rules shows which 404 page a URL would get, 
with the values not yet saved.

**Search engines**

The response keeps the status 404 and carries an `X-Robots-Tag: noindex` header.
While the `<head>` is printed, WordPress reports a 404, so that SEO plugins handle
the request as an error page.

**Languages**

404 pages can be translated with Polylang. Select a 404 page in any language, the
plugin shows its translation in the current language. Language prefixes are not 
part of the paths in your rules. The language switcher leads to the home page of
a language.

**Statistics**

The plugin counts 404 errors per month, by the path rule or post type that applied,
otherwise as “Default”. A dashboard widget shows the current month as a bar by category,
the tab _404 Log_ shows the last 12 months, together or one by one, with the most
frequent URLs. Older months are deleted.

Only the path of a URL is stored, percent-encoded and without its query string, 
together with a counter. IP addresses, user agents and referrers are not stored.
A month holds up to 1,000 rows; beyond that, new URLs are only counted by category.
Requests answered by a page cache do not reach WordPress and are not counted.

Counting can be switched off in the tab _Settings_. The statistics can be deleted
in the tab _404 Log_.

**For developers**

 * Filter `shawesome_c404_page_id` – change the 404 page of a request.
 * Filter `shawesome_c404_log_limit` – change the number of rows a month holds.
 * Template `single-shawesome_404.php` in a theme – replaces the page template for
   404 pages.
 * All callbacks are named functions and can be removed with `remove_action()` /`
   remove_filter()`.

## Screenshots

[⌊Settings: a 404 page for every public post type and a default, path rules by prefix
or regular expression, and the URL test showing which 404 page a URL gets.⌉⌊Settings:
a 404 page for every public post type and a default, path rules by prefix or regular
expression, and the URL test showing which 404 page a URL gets.⌉[

Settings: a 404 page for every public post type and a default, path rules by prefix
or regular expression, and the URL test showing which 404 page a URL gets.

[⌊404 Log: errors by category and the most frequent URLs, with a shortcut to a new
path rule.⌉⌊404 Log: errors by category and the most frequent URLs, with a shortcut
to a new path rule.⌉[

404 Log: errors by category and the most frequent URLs, with a shortcut to a new
path rule.

[⌊The list of 404 pages with the column "Used for".⌉⌊The list of 404 pages with 
the column "Used for".⌉[

The list of 404 pages with the column “Used for”.

[⌊Dashboard widget with the 404 errors of the current month.⌉⌊Dashboard widget with
the 404 errors of the current month.⌉[

Dashboard widget with the 404 errors of the current month.

[⌊Front end: the 404 page of a path rule for a shop URL.⌉⌊Front end: the 404 page
of a path rule for a shop URL.⌉[

Front end: the 404 page of a path rule for a shop URL.

[⌊Front end: the 404 page for posts.⌉⌊Front end: the 404 page for posts.⌉[

Front end: the 404 page for posts.

[⌊Front end: the 404 page for pages.⌉⌊Front end: the 404 page for pages.⌉[

Front end: the 404 page for pages.

## Installation

 1. Upload the folder `shawesome-contextual-404` to `/wp-content/plugins/` (or upload
    the ZIP via _Plugins  Add New_).
 2. Activate the plugin.
 3. Create your 404 pages under _shawesome  Contextual 404_ in the tab _404 Pages_.
 4. Assign them in the tab _Settings_.

## FAQ

### Posts and pages show the same 404 page.

With the permalink structure `/%postname%/` they cannot be told apart, see the description.
Use a prefix for posts, e.g. `/blog/%postname%/`.

### A 404 page is not shown.

Only published 404 pages are shown. If an existing redirect applies to the URL, 
it takes precedence.

### Does it work in a multisite network?

Yes. Each site has its own 404 pages, rules and statistics. On uninstall, the data
of every site is removed.

### What happens on uninstall?

The settings, all 404 pages and the statistics are deleted.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“shawesome Contextual 404 – Different 404 Pages by Post Type and URL” is open source
software. The following people have contributed to this plugin.

Contributors

 *   [ shawesome ](https://profiles.wordpress.org/shawesome/)

[Translate “shawesome Contextual 404 – Different 404 Pages by Post Type and URL” into your language.](https://translate.wordpress.org/projects/wp-plugins/shawesome-contextual-404)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/shawesome-contextual-404/),
check out the [SVN repository](https://plugins.svn.wordpress.org/shawesome-contextual-404/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/shawesome-contextual-404/)
by [RSS](https://plugins.trac.wordpress.org/log/shawesome-contextual-404/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * Initial release.

## Meta

 *  Version **1.0.0**
 *  Last updated **8 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.4 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [404](https://wordpress.org/plugins/tags/404/)[error page](https://wordpress.org/plugins/tags/error-page/)
   [multilingual](https://wordpress.org/plugins/tags/multilingual/)[not found](https://wordpress.org/plugins/tags/not-found/)
   [post type](https://wordpress.org/plugins/tags/post-type/)
 *  [Advanced View](https://wordpress.org/plugins/shawesome-contextual-404/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/shawesome-contextual-404/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/shawesome-contextual-404/reviews/)

## Contributors

 *   [ shawesome ](https://profiles.wordpress.org/shawesome/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/shawesome-contextual-404/)