add these to your function.php
add_action( 'template_redirect', 'custom_redirect', 1 );
function custom_redirect() {
$direction = get_permalink( 12 ); // Or whatever the page_id is ...
if ( is_404() ) wp_redirect( $direction );
}
There. But it still not tracking the 404 errors. Unless you add more specific codes in the function which counts all the redirection or on the destination page for the same purpose.
Related Posts:
- “Add Media” button in custom plugin
- Disabled plugins are they security holes – rumor or reality?
- How to implement WordPress plugin update that modifies the database?
- Looking for a Table of Contents (TOC) plugin for WordPress
- Writing test cases for a WordPress Plugin that has translations
- Customize plugin update “new version is available” text
- “Donate to this plugin” for WordPress.org Plugin Authors
- When coding a WordPress theme, where does the theme (i.e. the presentation) end and the plugin (i.e. the functionality) begin?
- Core framework/helpers for logging stuff?
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- How to handel multiple checkbox field in the admin settings page with Settings API
- Are orders of magnitude used for “Active Installs”?
- To remove plugin notices for non-admin users
- How can I force a “404 Not Found” error
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- Files being generated in multiple directories supposedly by WordPress (advanced_settings.php and common_config.php)
- Is there a plugin that allows a user of your site to get an email from you with an attachment?
- An old plugin self-made stoped sending mail
- Is there a plugin that makes extnernal links open in new window, BUT [closed]
- Is there a neater way to do this?
- plugings request url is the old url
- Authorization header malformed. [jwt_auth_bad_auth_header]
- Unable to activate wordpress importer after installing it
- Trying to count the total number of paragraphs inside a blog article
- Installing WordPress only for a separate page – ‘mydomain.com/blog’
- How to get number of Affected rows from wordpress dbDelta() function
- Headers already sent when I try to add headers via a shortcode
- Test files for plugin development
- CodeColorer: Allow Some Symbols in Java Language
- Outbound Click Tracking
- Error with Image Slide plug-in/ s3slider in WP
- How to add an automatic refresh in WordPress for a Page/Post or an embedded OneDrive/Excel HTML Code?
- File Storage and Repository for individual user
- Collect user information when click on download link [closed]
- How to allow user to select User ID in Formidable Pro form? [closed]
- Can’t Install Standard Plugins on a Local MAMP installation
- How to Display WordPress Plugins in Normal Website (Without WordPress)?
- Custom Shortcode Broken in WordPress 3.1
- Detailed form plugin, with ability to export to excel etc. OR edit PDF live? [closed]
- How to get plugin name from plugin file location
- How do i edit the plugin files in DataBase via phpMyAdmin?
- How to set intervals in cron jobs?
- Why Do I get “wp_remote-get: could not handle for fopen()”?
- Sticky option for custom post types without using custom fields or plugins
- Let users sell video in my website [closed]
- How to be escape Variables and options when echo?
- Where does MonsterInsights put Google Analytics code?
- how do i change my website facebook login button to another text immediately user login? [closed]
- WordPress Social Sharing Icons – Custom Placement
- check uncategorized category by default
- Trying to add_action in a loop
- Using meta_query in a WP_Query not working for numbers properly
- How to get rid of Ellipsis on Woocommerce [Essential] Theme [closed]
- Settings API Message Error is global
- Permalinks and pagination are not working in WordPress with WP e-Commerce plugin
- Dynamic Rating Plugin to Add Anywhere
- How to add logo to a WordPress Custom Plugin?
- How can i find the cron jobs that run on my site and then move them to the server side?
- Why does “updated_post_meta” did not fire when uploading media other than image?
- Hide fields in woocommerce settings
- Using OR Condition with facetwp facets
- insert og image link in wordpress post
- How to copy the all WordPress media items to another custom plugin folder?
- Bulk Edit Media Library alt, caption, image names
- WordPress is redirecting me to homepage
- See which user role / capability is needed to use a plugin
- Forbidden 403 Access to this resource on the server is denied
- Error on plugin activation and creating new page
- Child theme modifications not showing up
- Moving a few select DB tables to a new WP instance
- Custom REST API POST Endpoint Not Working, 404 Error
- “Fire Secure” menu item
- How to get the total count of Favorite/Favorited authors
- Admin login substantially slower on production server
- Can Hosting affect a plugin from working properly?
- My own metabox checkbox plugin only saves the last value I’ve checked
- Admin page and admin menu. Permissions plugin
- How to create a new database table whenever user changes options
- How to redirect from plugin page
- Can’t redirect to previous page after using GET
- Gravity Forms Salesforce field mapping for custom objects
- What is the Object for WP_Error Class?
- Hide/Show panel not showing – ACF
- How do I locate specific file in a post that affects ssl?
- Looking for Plugin that displays Facebook group’s photos [closed]
- Publishing tweets from wordpress [closed]
- WordPress Plugins Error
- Any way to hook into WP after a page displays?
- selecting options from another form
- How do I put a word-press blog into my static site without installing wordpress on server?
- Translate text for empty product
- WordPress Smart Iframe Browser [closed]
- Make plugin admin page visible to other roles
- How To Convert External Image URLs To Own Website’s Uploaded Images Automatically?
- Getting 400 Error in wordpress website
- How can i store cache of wordpress a database request without plugins?
- disabled plugin and now wordpress won’t load
- How to provide page_template path in custom plugin using WordPress
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)