You can assign the 404.php as a template to your custom 404 page created with the page builder.
You would need to edit the 404.php to something like this:
<?php
/**
* Template Name: 404
*/
get_header();
$query = new WP_Query([
'posts_per_page' => 1,
'post_type' => 'page',
'meta_key' => '_wp_page_template',
'meta_value' => basename(__FILE__)
]);
if ($query-> have_posts()) {
echo do_shortcode($query->post->post_content)
}
get_footer();
This way you would load the contents of your custom 404 page into the 404.php template.
You probably need to adapt the code above to the actual HTML structure of your theme.
Related Posts:
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?
- How do I skip wordpress’s 404 handling?
- Why specific file directory fails to redirect but its parent folder succeeds?
- WordPress blocking/preventing viewing of .cgi file in subdirectory [closed]
- Deny access to a path (give 403 or 404 response)
- Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance
- How to redirect an old page url to the homepage
- How to redirect non existent pages/posts in wordpress using htaccess
- How do I skip wordpress’s 404 handling?
- Subpages return 404 server error
- WordPress subfolders htaccess bypassing the root htaccess RewriteRule
- How to Redirect Url to homepage?
- How to force a 404 on WordPress
- Redirect Restricted Page to 404
- How to prevent automatic redirection of 404 errors and “incorrect” URLs?
- WordPress Redirect All HTTP requests to HTTPS via .htaccess
- Redirect entire website to a single page
- How do I programmatically generate a 404?
- Old blog/ and blog/feed/ URLs not working after moving blog to top-level via .htaccess
- Non-WordPress page in subdirectory under WordPress page
- Force HTTPS using .htaccess – stuck in redirect loop
- Redirecting WordPress /.htaccess / HSTS / SSL
- 301 redirect not working through .htaccess
- Site redirects to wrong url when saving settings
- How to redirect url requests to https? [closed]
- Htaccess redirect from ‘/%postname%.html’ to ‘/%postname%’
- Redirecting old permalink to new one
- Index in root, wordpress in subdirectory
- Redirect www to non-www htaccess
- 302 redirect instead of 301 after switch to HTTPS
- Specific URL has 403 Forbidden status code
- Problem to redirect custom page using htaccess
- htaccess redirect not working
- htaccess wildcard redirect misses some URLs
- Redirect from https to http or from http to https? [closed]
- Redirect too many times htacces switching to https
- 404 redirection and Google’s index [closed]
- Redirect to https not working with .htaccess [closed]
- How to do 301 redirect to Sub page using htaccess file?
- Redirect feed to 404 page
- htaccess redirect – directory and subpages to a single page
- WWW to non WWW redirect effects on load speed
- Check if post is in draft or pending review?
- Can WordPress redirect to a “similar page” in case of 404 error
- htaccess redirect dynamic posts
- Hacked website redirect, only on desktop, help with restoring it [closed]
- RedirectMatch and Redirect interfering with each other
- How to hide that a certain non-WordPress directory exists on the server?
- Menu links only using http after enabling https, unable to redirect http links
- Redirect “any page/page/number/” to “any page”
- WordPress site in subdirectory load site in main directory
- https multiple redirects
- How to create a 301 redirect that doesn’t apply to subsites
- Why does multisite bypass WordPress for wp-content, wp-admin, wp-includes and .php files?
- WordPress multisite htaccess redirection to new domain
- some url does not redirect from http to https
- Why can’t I access files / directories outside of wordpress
- Redirect blogpage /blog/abcd/ to /blog/
- https redirect (with .htaccess) redirect loop
- How to redirect from various ?page_id= to home page?
- htaccess 301 redirect http to https doesn’t work
- Redirect home to another page with htaccess
- Redirect all pages except one to homepage via .htaccess
- 301 Redirect Loop
- Redirect 301 www.my-site.com/page/n to www.my-site.com/ [closed]
- Redirect a page id url but not the page slug
- Redirecting old post url to 404 in wordpress using htaccess
- Headless WordPress redirect front-page to login page [closed]
- How to redirect subcategories to a page?
- Use htaccess to redirect WordPress to static website in a subfolder
- htaccess redirects and WordPress
- Redirect blog archive into certain format
- 301 Redirect To Post ID
- CNAME vs A Record for WWW – with 301 Redirects
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- Defining a custom 404 for non-WordPress parts of site
- htaccess rules not applied?
- Use virtual pages point to one specific page
- set up 301 redirect within wp-content/uploads/ directory of a WP site to a new image URL
- htaccess redirect – replace special character
- Issue with htaccess redirection in WP Multisite
- Redirect from sub-directory to root – New WordPress 5.2.3 Set up
- How to add new redirection on wordpress site
- Load time cost of using a redirect plugin v direct .htaccess entry
- How do I redirect all 404 error url to Subcategory url
- .htaccess rule to redirect old URLs to new structure [closed]
- htaccess redirect invoice.php to /client/invoice.php
- How to redirect URL with subfolder to the same URL but without subfolder?
- .htaccess Redirect
- htaccess 301 Redirect not working for WordPress site
- What is the right way to redirect all traffic to HTTPS?
- Custom Permalink
- Site loads very slowly (4-5 minute load time)
- How to set 301 redirection after moving WordPress blog?
- WordPress Auto-Redirecting on 404
- Redirecting amp url to non amp url
- How can I redirect a URL to an anchor link while maintaining the URL?
- How to remove duplicate and unnecessary part in a url using htaccess and regex?
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?