• When I click “Publish” after writing a new post, how can I make WP return to the main blog page instead staying in the editor?

Viewing 1 replies (of 1 total)
  • Thread Starter jimturner

    (@jimturner)

    I finally found it. Might not be the best solution, but it seems to work.

    Line 161 of /wp-admin/post.php…
    Before:
    $location = 'post.php?posted=true';
    After:
    $location = '/';
    This will take you back to the main page after a publish or an edit (save).

    To do the same thing after a post delete, edit line 466 in /wp-admin/post.php…
    Before:
    if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
    After:
    if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/';

    If anyone knows a better/cleaner way of doing this, please let me know!

    I am using WP v1.5.2 if it makes a difference.

Viewing 1 replies (of 1 total)
  • The topic ‘redirect to main page after publishing new post’ is closed to new replies.