mercredi 7 mars 2018

PHP if/then statement

Need help with some php to modify a WP plugin which is paid memberships pro. Terrible at php here.

What am trying to do is create one line of code that would say if the membership level equals XXX then print this link. SO the variable I would need are somewhere in this line I imagine:

<li><strong><?php _e('Membership Level', 'paid-memberships-pro' );?>:
</strong> <?php echo $current_user->membership_level->name?></li>

The above is just a snippet of code already found in the page I want to create this if/then link statement.

so something like:

<?php if($Membership Level == $Conflicts of Interest #14124(that's the name 
of one level) then print this link.

AM I making sense?

Aucun commentaire:

Enregistrer un commentaire