Community Support Forums — WordPress® ( Users Helping Users ) — 2011-02-14T10:41:52-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2249 2011-02-14T10:41:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2249&p=6707#p6707 <![CDATA[Re: Assigning Posts/Where is Purchased Post Data Kept?]]>
Is there an area where posts are matched to users? Maybe that would lead me in the right direction. Or maybe there is actually a hook or function to assign posts to users?

Statistics: Posted by PxO Ink — February 14th, 2011, 10:41 am


]]>
2011-02-12T20:05:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2249&p=6649#p6649 <![CDATA[Assigning Posts/Where is Purchased Post Data Kept?]]>
I'm wondering if I can assign a specific post to a user once they've signed up. Assuming that this kind of request fell under user meta data, this is my function mockup to explain:

Code:
function assignPost($user_id, $post_id) {
     $posts = get_user_meta($user_id, 'posts_purchased', true);
     $posts .= ":$post_id";
     update_user_meta($user_id, 'posts_purchased', $posts);
}


I basically want to assign everyone post_id = 1, and from then on I want only certain users to be able to access certain posts (depending upon other variables, most likely meta data.) I want them all to be under the same role.

Hopefully I can also somehow integrate drip feeds into this, like once a post has been assigned 7 days later it's sent to them via email.

This is really important to me and if anyone can point me in the right direction I would be very grateful.

Statistics: Posted by PxO Ink — February 12th, 2011, 8:05 pm


]]>