Redirect to Write-Post window after click publish
-
Dear experts,
Lord knows I’m not a great programmer and I’ve tried to get to the bottom of this but I need your help. Imagine you’re writing/editing a post. When finished, customarily you click publish and the user is automatically redirected to the post index and hey presto, there’s your most recent post at the top. That’s fine if you don’t mind switching back and forth between reader and editor mode but
I’d like to read the posts in one window and have the Write-Post editor open in another window. After clicking publish, I’d like the editor window to either close itself, so I can reopen it with a button. Alternatively, I’d like the editor window to redirect to itself. That way, it’s always an editor and I don’t need to continually open/close it.So, in short, how can I achieve either of these?
I’m using WP 2.6.2
I’ve tried the following:
1. The open/close editor window method: I’ve tried getting the Write Post window to close on submit. I created a button-link to https://mysite.com/wp/wp-admin/post-new.php. The idea was that I’d click on this to open an editor window. After each post, the editor window closes and I click the button-link to re-open the editor window. The editor window opens fine. Problem: The window closes BEFORE posting the blasted thing.In edit-advanced-post.php
[line 48] <form name=’post’ method=”post” action=”post.php” onSubmit=”window.close()” />Note: I’ve also tried adding calling a JS function onClick=”postandloop”
—————————————-
<script lang=”text/javascript”>
function postandloop(){document.post.submit();
window.close();
}
—————————————-
Problem: Same problem.2. The redirect solution. My investigative eye leads me post.php, which seems full of condition blocks with redirections. Unfortunately, virtually none of WordPress contains comments, so to me it’s virtually unintelligible.
Can anyone help?
Thank you in advance.
Pete.
- The topic ‘Redirect to Write-Post window after click publish’ is closed to new replies.