Forum

Thread tagged as: Question, Api, Members

Automatic Tags in Members App

Hi, I would like members to be able to unlock content automatically based upon what they want to access. Is there a way to allow for member tags to work automatically without having to do it manually? For instance, say they finish up a course which in turn automatically unlocks the next course. Or after filling out an email, they are given more access. Hope that makes sense. Thanks!

Greg Stone

Greg Stone 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can do it form your code with perch_member_add_tag()

Thanks Drew!

Would you be willing to give me an example or sample of how to implement perch_member_add_tag(). I cannot seem to find any examples in the templates. Thanks!

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's a page function, so it won't appear in the templates.

Add tag 'foo':

<?php perch_member_add_tag('foo'); ?>

Add tag 'foo' to expire in 3 months:

<?php perch_member_add_tag('foo', '+ 3 MONTHS'); ?>