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:
- How to export all content with feature images?
- Cron Job not working in plugin
- this jQuery function works perfect in static html page but not on wordpress
- Sidebar widget: Randomly select text from a given set
- Run a plugin just ‘once’ per page reload
- How do I add content to the dashboard in WordPress?
- redirected you too many times
- Create custom pages with a plugin
- Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?
- $wpdb update query in plugin only updating one column
- WordPress as template engine
- Cropping images from top center using Jetpack Photon
- XML Sitemap Generator can’t notify google and bing
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- How to see which sites use my installed plugins (wordpress multisite)
- how remove font to increase site speed load
- Woocommerce Backend Search by Title and SKU
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Can the benefits of performance optimization plugins outweigh the tax of installing them on performance?
- Minimize and Uglify WordPress Plugin Files
- How do I make sure that my plugin only runs on article detail pages?
- Post deleted in trash [closed]
- WordPress API functions not working at AJAX functions.php call
- How to relate 3 wordpress components with each other (Create database relationships)
- Remove specific administrator’s capability
- Different Layerslider by page id?
- How to change Header image depending on language [closed]
- How do I show content from a plugin using the template the site is currently working with?
- WP audio video player with previous next options
- Archive with months of current year only
- How to check homepage contain blog post?
- Interface needed to transfer contents in a table on a web page to the Add New Product interface
- Need to setup grid like thumbnail of recent posts on sidebar
- Advanced Custom Fields Plugin – Images not displaying
- is_front_page breaks with url parameters generated by a plugin
- use EDD Content Restriction for restricting php in template
- Save log for imports in WordPress database – options-table, custom post type or other place?
- page duplication on wordpress that wont stop
- the_posts_pagination() not working if I add wp_head() to header.php
- Need help with Task assigning and rewarding as currency which withdrawable
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- main navigation menu disappear after adding jquery source file
- Write field Co-Authors Plus WordPress JSON REST API
- How to pass all received IDs through the function for in_category
- ACF get post Id?
- Getting unknown text in footer of email
- Insert Sponsor logo in custom own theme
- Dynamical slug on custom post type
- Compare Ajax Data Results
- WordPress delete cookie
- I want the Widget title to set below contant
- Convert slugs on post publish
- Storing Array of values into wordpress options
- I have a plugin that applies a Google translation to my page–how does the browser know which language to display?
- WordPress Add advertising ads befor and after content with periority [closed]
- Upload image to wordpress using ionic/cordova with WP REST API V2
- Function in my plugin is called twice
- Same Title on two different post type with single custom taxonomy
- Every time I use wp_get_current_user() my plugin breaks
- woocommerce blank page after clicking add to cart [closed]
- Working plugin code breaks admin
- wordpress option page data from select form is not saving to database
- How to use shortcode of any plugin to show it visually where i want?
- Custom User Role
- Filter the HTML content of plugin
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- A plugin is giving me “You do not have sufficient permissions to access this page.” error
- WordPress not updating post or disable plugin instead a white page appear
- WordPress MU LDAP connection failures
- Plugin not installing properly, functions being redeclared
- WordPress automatic plugin update
- Use wordpress for school results?
- Why is this plugin not working?
- How to list posts that appear in two categories
- pre-upload text and video for the future
- why the current date do not update
- Woocommerce Bookings – Resource needs to be allocated for part of the booking duration, not the whole booking
- Load my plugin before cache
- How to get current template file used by WordPress?
- wp_insert_post() get Fatal Error from Plugin
- Is it possible to debug plugins with Xcode?
- Plugin link does not appear in my toolbar
- Supersize plugin error in internet explorer 7 and 8 [closed]
- Zigconnect Plugin: Allowing editors to remove connections
- Need Header slider plugin recommendation [closed]
- Admin access to WordPress site with installing plugin
- Is there a method or plugin to download my products in WooCommerce?
- Add image before link in woocommerce plugin [closed]
- How to change data format in custom meta box field [closed]
- Sidebar Slideshow widget with text [closed]
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- Plugin to Display Content on Page
- Render CMB2 select option to post page [closed]
- How can JavaScript code be added before the closing HTML body tag?
- Is Nonce Verification (CSRF) required for WordPress Custom Bulk User Actions?
- plugin development code standard not matching for SQL query
- Ajax response from Media Selection does not update ALL information more than once
- PHP Deprecated function Optional parameter $function
- Missing Contact Form/Form Default Plugin in WordPress