1

I have a WordPress site which is already using the CiviCRM WordPress Member Sync plugin to sync memberships to roles.

On this same site, I also want to show/hide certain content based on the user's having a membership of any type, age, or status -- basically, if they've ever had a membership, WP should use that fact to show/hide some content.

This show/hide should be possible with roles, capabilities, or groups, but I can't yet find a way to sync this "ever been a member" status to one of those. It seems like it requires a smart group in CiviCRM, and then I don't see any existing plugins that support syncing smart groups to roles, capabilities or groups.

Also, we need to continue using CiviCRM WordPress Member Sync for its current usage, and it doesn't seem to support additional sync rules beyond "one rule per membership type" and "only sync to roles, groups OR capabilities, but not to any combination of those."

Is there a plugin or combination of plugins that will allow this to be done? Or does this need a custom-built plugin?

  • 1
    I've been asked to merge CiviCRM WP Profile Sync, CiviCRM WP Member Sync, BP Groups CiviCRM Sync (and CiviCRM Groups Sync) into a monolithic sync plugin at various points but my feeling is that they are better kept separate. Andy's answer seems the way to go in your case. – Christian Wach Feb 25 at 10:33
  • I strongly favor keeping them separate. – Andy Burns Feb 25 at 15:40
3

I would move to using groups and not roles for permissioning because it gives you more flexibility. People can be in multiple groups then.

There is the CiviCRM Groups Sync which syncs a regular CiviCRM group to a WP group. So that may be an option by auto-adding members to the CiviCRM group and creating their WP user at the form-level.

The other option is to improve the plugin by having it sync smart groups.

| improve this answer | |
  • It sounds like @TwoMice probably has the WordPress users from their historic Memberships -- so CiviCRM Groups Sync should be just the ticket. – Christian Wach Feb 25 at 10:35
  • 1
    CiviCRM Group Sync doesn't support smart groups (right Christian?), but I'm pretty sure I can 1) create a regular group "ever members" in civicrm, linked to a WP group 2) pre-load all contacts who've ever had a membership into that group, 3) configure civirules to add the contact to that group whenever a new membership is created. I.e., because no-one will ever leave this group, it doesn't really need to be a smart group at all. Thanks for throwing around ideas, Andy and Christian. – TwoMice Feb 25 at 14:57
  • Hmm, dang it @TwoMice you're right of course - my memory's failing me. I should put that on a todo list for CiviCRM Groups Sync - given that Smart Groups have an admin UI once created, that would be possible. But yeah, your CiviRules approach would work right now. – Christian Wach Feb 25 at 16:16
  • Okay, OTOH Smart Groups can't be of type "Access Control" so perhaps I'll scratch that todo item. – Christian Wach Feb 25 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.