wp_die()
See the codex for full usage details:
https://codex.wordpress.org/Function_Reference/wp_die
You can even include html in the message field if you want to.
Related Posts:
- How to eliminate weird 404 errors in wp-admin?
- Feed 404 Errors
- How to fix strange 500 Error after Editing Menu?
- Unwanted redirect in admin area
- In wordpress I am manipulation 404 response. I want to give the response before 404 error is given to google
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- Why does my WordPress show a 404 message for 403 forbidden directories?
- Moved to new server, all pages work EXCEPT home page (page not found)
- “Lost password” page triggers 404
- 404 to 301 – Fixing old links
- How do I go about fixing this apparently messed up upgrade?
- PHP Notice error (when on 404 page)
- WordPress Stats keeps showing non-existent post as a top post?
- What does do_action(‘admin_init’); does actually?
- Form in WordPress : 404
- Why Runtime service worker (runtime-service-worker.js) is being loaded, but can’t be found?
- Getting a 404 error when clicking edit page
- Nginx with WordPress not showing template 404 for certain file types
- Is there a way to avoid 404 pages in WordPress?
- Intercept 404 and try to serve another content if exists?
- WordPress takes too long to show 404 error on images (on LEMP stack)
- Template redirect template loaded, but the header 404
- How can I send an email in my plugin?
- All pages after level 1 showing 404 after WordPress migration plugin – how to fix?
- Why I get File Not Found (404 error) when the file is actual there?
- Created php page in wordpress – Error Page can not be reached
- WP_DEBUG must be on, otherwise edit post or page will show 404 error
- Trouble with CPT Child 404
- Getting “404 page not found” error when i access to my Login page
- Virtual robots.txt missing
- Moved from Blogger to WordPress, however I can only see the Google 404 page
- My Homepage Suddenly Disappeared and I Can’t Get It Back
- wp-tinymce.php 404
- Display child pages on parent page: 404 message overrules shortcode in page
- Permalink Doesnt Work – URL Not Found
- Using a custom 410 page
- Incorrect url for sharing blog on linkedin [closed]
- Catch 404 errors in nested installations
- WordPress 404 Page displaying on a sub directory that has it’s own 404 page
- Why do I have a weird rendering issue only on 404.php caused by wp_nav_menu?
- make wordpress log errors in apache log file
- Page not found (404 Error) even if the page exists?
- Custom JSON feed rewrite
- My wordpress website does not show 404 page and results in http 500 error
- wp-json Returns 404 Upon Plugin Activation
- WordPress 404 errors for old plugin files via Google Bot
- When I remove get_header() from 404 page, my css doesnt work
- Blog automatically redirected to error page
- Some users getting a 404 when previewing draft posts/pages
- Site Address (URL) – causing error 404
- 404 Not found error after update to WordPress 5.0
- full blog working fine but post-new.php throwing 404
- Scheduling publish of a new version of existing page results in 404
- Page not found but cannot make a new one because the slug is already there
- No 404 page available
- returning 404 page error on form submission [duplicate]
- How can I block with a child theme certain pages?
- Failed to load resource:404 image
- Page not found when trying to link to files in child theme directory
- Getting 404 error on homepage only
- Can’t view post, goes to 404 page. Please help
- WordPress broken after vhosts setup
- Lots of 404 errors of pattern /null&rand=. Why?
- When trying to access home page, WordPress appends /wordpress to domain name which gives 404 error
- wordpress sitemap subtypes returns 404 with correct data for pages bigger than 1
- Why am I getting Intermittent 404 pages on a sub domain with WordPress?
- Page not found after migration to localhost. I already updated the sql links and the permalinks. Wp-admin page works perfectly
- 404 error on new pages but only for non logged in users?
- How to fix mime-type and (after disabling nosniff) 404 errors for css and js files in staging site
- Could use some help moving site to subdirectory, what am i doing wrong?
- WordPress 404 all pages except home
- Problem with a wordpress admin system. and website
- 404 Not Found Error showing when I run wordpress
- WordPress as backend for SPA – problem of 404 page for custom routing
- Since moving HTTPS using cloudflare, the admin and login pages no longer work
- Pages counts are showing in WordPress backend but pages shows 404
- wp-admin throws 404 when accessed from some IPs
- WordPress website dont load CSS, JS and images
- fix slugs containing invalid characters?
- I’m getting 404 when editing a post with hyperlink, what’s wrong?
- Downloading zip or tar.gz inside WordPress installation?
- https images not displaying
- Page 2 404 Error – From main homepage, not custom post type
- Error 404 when saving or previewing one specific page [closed]
- Copying live site that is using older version of WP to localhost
- new post link leads to 404 error page
- Error 404 on wp-includes directory
- Why are 404 errors redirecting to my homepage and not my custom 404.php?
- How to set up wp multisite?
- WordPress shows 404 on pages 11 and above?
- Posting to most pages throws 404
- Using calendar and page does not show calendar for next or previous year
- 404 Error for Custom Post type
- $_POST[‘message’] gives a 404 [duplicate]
- HTTP status 404 (error) when trying to log in
- Page/2 posts don’t load and give 404
- %20 in URL in archive page shows error 404 on page [closed]
- Author page not found
- Getting 404 error while file exists
- How to navigate to a non-wordpress page in a wordpress install without getting a 404 error?