Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Programmatically assign post (custom post type) to existing user?

UserPost

10:13 am
February 23, 2011


rpetersnmt

Member

posts 2

1

I'm trying to find the most clear way of describing my situation here in hopes that someone can point me in the right direction.

I have a website where I sell editable "listings" of homes/properties.  Using Role Scoper, I've created a simplified WP admin area where the user (when logged in) is directed right to their list of "Properties".  A  Custom Post Type that I created.  I use the Gravity Forms Plugin (and a CPT "type" filter) to create DRAFT "Properties" from a form and by doing so, I can intercept the post/page creation and charge (via PayPal) for its creation.  All is coming along nicely….except that after the creation, I still need to get in and manually connect these new posts/pages with the specific user that is created them.  By connect, I mean, that I need to assign this user the RS capability ("Property Editor") for this particulare post. By default, my users are just subscribers with no editing capability..I assign them this single CPT editor capability for just the pages that they've created.  The cannot manage anything else in the site.

So…I hoping for a way (I'm not a plugin-writin'-PHP-all-star, but I do like a challenge) to programmatically connect my user(s) to their newly created page/posts and (with some parameter passing and filter/hook usage?) making a altogether hands-off web solution for myself.

Anyone have any suggestions or hints of where I might go looking next…I've sortof stalled out after several hours of scouring for a solution.

Thank you for the fantastic plugin and thanks in advance for any assistance here, 

Ross

1:20 pm
March 10, 2011


Kevin

Admin

posts 2502

2

I've implemented some similar automation for clients, but that's not functionality that I've developed a generalized solution for. If you still need this developed, I would be glad to provide a cost estimate after looking over your existing code.


About the Agapetry forum

Currently Online:

11 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1244

Posts: 5649

Members:

There are 1254 members

There are 1 guests


Kevin has made 2502 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin