WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is possible to have a direct access to the site when log in? I mean, when you log in, you access to the WP editor page. I want that user of my site will directly forwarded to the site.

share|improve this question
What do you mean exactly? Do you want them to be redirected to the Articles dashboard page? Or to the Pages dashboard page? Or to altogether create a new article or page? – Sunyatasattva Mar 19 '13 at 16:25
No. I want that the homepage of the site is shown. – the_candyman Mar 19 '13 at 16:33

That is pretty straight forward, you use the login_redirect filter hook which is there for exactly this case.

You would add something like this to your functions.php file:

function home_login_redirect( $redirect ){

    // Check if user is administrator; you probably want to redirect
    // him to the dashboard, don't you?
    if ( current_user_can( 'administrator' ) return $redirect;
    else return home_url();


add_filter("login_redirect", "home_login_redirect");
share|improve this answer
thank you very much! but I cannot access to functions.php (actually, I cannot access to the file system which hosts the site). I can only execute php code by using some suitable plugin. – the_candyman Mar 19 '13 at 16:54
If you have administrator permissions you can always access the functions.php file through the dashboard. Just go to Appearance > Editor from there, on the right side, you will see the functions.php. – Sunyatasattva Mar 19 '13 at 16:56
At the end of editor page, I have the following: "You need to make this file writable before you can save your changes. See the Codex for more information." – the_candyman Mar 19 '13 at 17:13
And did you read the Codex for more information? Anyhow, are you sure you cannot access the host? That's very weird. If so, you are basically asking a plugin recommendation, which is off-topic on this site. Also, if really so, your question answers itself with a simple Google search: here's the first match wordpress.org/extend/plugins/custom-login-redirect – Sunyatasattva Mar 19 '13 at 17:20
The site is hosted by the server of my department. Their policies does not allow access to the filesystem to external people. – the_candyman Mar 19 '13 at 19:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.