• I used to have the groups pulled into the author page and it substituted a graphic for each group ID so it made more sense to the user instead of group 1, group 2 etc.

    Well, as I wasn’t paying attention to the upgrades, I didn’t create a backup of the function I created to do this. And I think the function died with 1.4 upgrade since it was rewritten.

    Long story short, is there a way to pull in the groups a user is a member of into their author page? If you could point me in the write direction, that would be helpful.

Viewing 1 replies (of 1 total)
  • Plugin Author Matt van Andel

    (@veraxus)

    Oh man, sorry it took so long to get back to you, I must have missed the email notice about this post.

    If you were using one of the original provided theme functions (like psc_get_groups()), they are still available under controllers/theme-functions.php – just copy the functions you need right out of there and into your themes functions.php file and everything should work again. Technically they’re deprecated, so I’m not loading them in automatically… but they’ll still work.

    If you want to rejigger things to use the new code, the method that handles this is CTXPS_Queries::get_groups(). This should be readily available for use in your theme files. To get an array of groups attached to the current user, just use this:

    $group_array = CTXPS_Queries::get_groups($current_user->ID);

    From there you could loop through and echo out group info like this:

    foreach($group_array as $user_group){
       echo $user_group->ID;
       echo $user_group->group_title;
    }

    Hope this helps. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Page Security by Contexture] Display Groups on an Author page’ is closed to new replies.