If you are looking to write an IF PHP statement to show content based on whether a contact has a certain ID. The code below worked for me. It’s a hyperlinked image that shows if the member has a specific tag ID.
<?php if ( memb_hasAnyTags( 9388, $contact_id = false ) ) { ?>
<a href=”https://www.example.com/” class=”cell”>
<div class=”clear box”>
<img src=”<?php echo esc_url( get_template_directory_uri() ); ?>/new-assests/images/ow.png”/>
<div class=”title”>
ASK A <br/>
<b>COACH </b>
</div>
</div>
<p>Click to learn more</p>
</a>
<?php }?>
If you would like to see how to write the following code if a member does not have a specific tag, please read this blog.