[wp-hackers] Custom Role and Custom Post Types

Ryan Bilesky rbilesky at gmail.com
Mon Feb 14 11:10:38 UTC 2011


Ya I find it works well, since they dont have too go to the backend
interface it keeps the site consistent for my users, it avoids the issues
you are having, and since my custom posts also have alot of meta data
associated with them, i can have the form collect the data and save it in a
consistent manner.

On Sun, Feb 13, 2011 at 7:11 PM, SWORD Studios <info at swordstudios.net>wrote:

> That's an interesting idea
>  On Feb 13, 2011 9:49 PM, "Ryan Bilesky" <rbilesky at gmail.com> wrote:
> > I'm working on a site where I have a custom post type that I am allowing
> > users to both create and edit. I actually don't let my user touch
> > wp-admin. I register a shortcode that I can use in a page to embed a
> custom
> > form that my users can use. Perhaps you could look into doing that
> aswell.
> >
> > In addition to that I use thememyprofile to allow user to change their
> > password and stuff from a frontend page then I block subscribers from
> > accessing wp-admin alltogether.
> >
> > On Feb 13, 2011 11:04 AM, "SWORD Studios" <info at swordstudios.net> wrote:
> >> Thank you Steve.
> >>
> >> Comments by Jesse Friedman
> >> Spelling by iPad
> >>
> >> On Feb 13, 2011, at 9:15 AM, Steve Taylor <steve at sltaylor.co.uk> wrote:
> >>
> >>> Jesse,
> >>>
> >>> You probably need to pay attention to the capabilities-related
> >>> argument of register_post_type:
> >>>
> >>>
> >
> http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
> >>>
> >>> I don't know how you're creating the new role - I used Justin
> >>> Tadlock's Members plugin, which also allows customization of the
> >>> role's capabilities. In tandem with the above arguments, I've been
> >>> able to do this kind of thing.
> >>>
> >>> As for creating the new post on registration, yeah, I think you're on
> >>> the right track with the new registration hook.
> >>>
> >>> cheers,
> >>>
> >>> Steve Taylor
> >>>
> >>> On 13 February 2011 13:42, SWORD Studios <info at swordstudios.net>
> wrote:
> >>>> Thanks in advance for any help I get with this.
> >>>>
> >>>> I've defined a new role in wordpress called Designer.
> >>>> I've create a custom post type called Profile.
> >>>>
> >>>> Designer needs to have 1 ability and that's to edit a Profile post.
> >>>>
> >>>> I need to accomplish the following
> >>>>
> >>>> - Create a custom Role called "Designer" - DONE
> >>>> - I need to limit the capabilities of the Designer to ONLY edit their
> >>>> Profile post. I do not want them to be able to "Add Posts" of any type
> >>>> because each Designer is only allowed one Profile Post
> >>>> - On registration of a "designer" a custom post "Profile" is created
> and
> >>>> published automatically with the new Designer set as the author
> >>>> - The title of this new Profile will be the name of the Designer set
> by
> >>>> the designer upon registration
> >>>>
> >>>>
> >>>> Problems I'm having
> >>>>
> >>>> - It's easy enough to limit the capabilities of the new role to only
> >>>> "edit posts" but that actually gives them access to the entire "Posts"
> > admin
> >>>> panel which include "add new"
> >>>> - How do I define that they can ONLY edit a Custom Post Type rather
> than
> >>>> a simple Post
> >>>> - How do I auto create a custom post type upon registration of a new
> >>>> user? I figure I can grab the hook that is used for a new user
> > registration
> >>>> and just add the post to the database manually. If this is the best
> way
> > of
> >>>> doing it, I can don't need help with this.
> >>>>
> >>>> Jesse Friedman
> >>>> _______________________________________________
> >>>> wp-hackers mailing list
> >>>> wp-hackers at lists.automattic.com
> >>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>>>
> >>> _______________________________________________
> >>> wp-hackers mailing list
> >>> wp-hackers at lists.automattic.com
> >>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list