add_filter( 'logout_url', 'custom_logout_page', 10, 2 );
function custom_logout_page( $logout_url, $redirect ) {
return '<the-URL-you-want-to-end';
}
If this does not work you can also change the general-template.php
Keep in mind that you do not find it in the wp-admin area, but you have to use FTP or WebFTP to find it.
You find it in the WP-includes folder
Search there for this code:
function wp_logout_url
right below it, you’ll find a return statement.
When you specify this, you also change the logout url.
I would definitely recommend you to create a copy of the general-template.php before you start editing.
I wouldn’t recommend messing with the core files.
Why?
Modifications of the core files can cause:
– security risks,
– performance degradation,
– broken plugins/themes,
– you will lose all changes when you next update the WordPress, etc.
If there are no hook present in a function you want to modify, it’s better to copy the function you need and change it in your Child Theme or plugin, rather than modifying the core files directly.
Thus, as the adage goes, don’t modify core files and please be aware of the limitations and drawbacks this imposes.
]]>