Coding for all posts–not just a page. Is this possible?
-
Loving the Paid Memberships Pro plugin, but I’ve run across a snag.
The category checkboxes here seem to only block a posts’ actual content area, but I need to also block out other info on the page displayed around the post based on their level: https://www.paidmembershipspro.com/documentation/content-controls/for-posts/
On the PMP webpage, they state you can use the following php on a page to show or reveal content to a member based on their membership level:
<?php if(pmpro_hasMembershipLevel('12')) { ?> //Your content here. <?php } ?>
But this doesn’t work in this case because it’s hardcoding in an actual level, and instead it needs to be able to match whatever category was set in the post.
(If the post is tagged as level 1 and user is a member of that level, display it, otherwise don’t. If the post is tagged as level 2 and user is a member of that level, display it, otherwise don’t, etc)
Make sense?
- The topic ‘Coding for all posts–not just a page. Is this possible?’ is closed to new replies.