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

I have a site here...

If a user clicks on Submit an Event or Send an Article, they are re-directed to a 404 page because I have it set up to make the page private.

What I want to do is if the user is logged in, it goes to the correct page. But if the user isn't logged in, then they get directed to this registration page.

I don't see any way to do this withing the settings of Wordpress.


share|improve this question
your site does not look good on 1024x768 – user9 Nov 4 '13 at 19:22
are you okay with a plugin to wordpress, or do you need php code? – user9 Nov 4 '13 at 19:23
A plugin is fine if it does what I'm looking for. I've tried Redirect to login if not logged in but that redirects to log-in page, from the moment the user steps on the website. I want the user to be able to get to the site, but if they click on a protected link, they get re-directed to the registration/log-in page. – webfrogs Nov 4 '13 at 19:35
And I'm aware of the resolution issues. Working on it. – webfrogs Nov 4 '13 at 19:35

In that page's template, do something like...

    $redirect = get_permalink(1); // where this integer is id of registration page 
share|improve this answer
+1 but could be done much earlier. template_redirect hook for e.g. – kaiser Nov 4 '13 at 20:15
I went to pages, and clicked on the "text" editor for that page, and input that above code, but it didn't work. Am I missing something? (I'm a noob with WP customizations)... – webfrogs Nov 4 '13 at 21:36
No. You're not going to solve this without writing some code. Sounds like you're just looking for a plugin, in which case I can't help you. – GhostToast Nov 4 '13 at 22:36

Then, you could try the Quick Page Post Redirect Plugin. Looking at the screenshots, it gives you rather granular functionality for redirection.

share|improve this answer

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.