show only if it applies to reply author
-
I’ve got a simple “php if snippet” I’m trying to get into loop-single-reply.php.
Here is an example of my snippet (used for a seperate membership script):
<?php require_once '/members/library/Am/Lite.php'; $user = Am_Lite::getInstance()->getUser(); ?> <?php if (Am_Lite::getInstance()->haveSubscriptions(364)) { ?> <span class='custom-user-donation-badge'>I've Donated!</span> <?php } else { // do the other thing ?> <?php } ?>
I need the code snippet to show only in the profile area of the reply author, if it applies to them.
In other words: “show this if it applies and only show if it applies to this specific reply author.”
I’ve used these before for something similar:
$reply_user_id = bbp_get_reply_author_id(); $reply_user = new WP_User( $reply_user_id )
I’m still leaning php and bbpress. Any suggestions on how I can wrap my code snippet with these bbpress statements? This way, my code snippet will only apply if it applies to the specific author.
Thanks for any suggestions.
- You must be logged in to reply to this topic.