Redirect to a specific post by author? | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering

Log In

Lost password?
Advanced Search

— Forum Scope —


— Match —


— Forum Options —


Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Redirect to a specific post by author?
June 10, 2012
5:54 pm

I've read through the forum and help files, and wondering if this is possible.

I have a custom post type in my client's site, and each post is tied to a specific user as the Author. Each user is only the author of one post (it's a custom directory listing).

What I'm trying to do is figure out how to have these specific users redirected to the permalink of the post they are the author of on login. So that it basically sends them directly to their business listing.

All these users have the role of Contributor.

I've tried a few different options trying to write a custom function, and they aren't working. A google search brought me here - so I'm wondering if this is possible with your plugin. If so, could you give me a hint on the code :-)

June 10, 2012
10:21 pm
Forum Posts: 841

Hi Barbara,

Yes, you should be able to do that. If you install the extension and already have code that checks whether the user is a contributor and finds the user's post, you can paste that code into your own function similar to the examples shown on this page: