Philip Kirkbride Philip Kirkbride - 2 months ago 21
PHP Question

Redirect after Login on Wordpress

I'm creating a customized wordpress theme based on an existing site.

I want to use an alternate dashboard which I have created.

How can I have the user directed to '

news.php
' after login instead of '
/wp-admin/
' ?

--

EDIT: Have a working Plug-in for this but the bounty is still availible for anyone who can find a manual way to do this through functions.php, as it would be more secure then using a 3rd party plug-in.

Answer

This should solve your problem. Adapted from an answer found here.

function admin_default_page() {
  return '/new-dashboard-url';
}

add_filter('login_redirect', 'admin_default_page');