Hi,
Sorry, here is the code again!
<?php if ( ms_has_membership() ) : ?>
<img src="http://my-site.com/wp-content/uploads/2015/11/img.png" alt="" height="25" width="25" /></img>
<?php endif; ?>
Also tried:
<?php
if ( ms_has_membership() ) {
echo '<img src="http://my-site.com/wp-content/uploads/2015/11/img.png" alt="" height="25" width="25" />';
} else {
echo '<img src="http://my-site.com/wp-content/uploads/2015/11/img2.png" alt="" height="25" width="25" />';
}
?>
Only the image in false is being returned for all users including paid members.
Any advice is much appreciated.
Thanks
Only the image in false is being returned for all users including paid members.
Then ms_has_membership()
is returning false.
Are you sure you’re using it correctly?
Maybe you need to pass a user_id?
if so, try ms_has_membership( bp_displayed_user_id() )
As it is a custom function, we have no idea how it is written.
Thanks for the amazing support!
Yes, I am sure it should return true as we have a lot of paid memberships!
And I think i am using is properly, here is the codex on it http://cbcd.org/wp-content/plugins/membership/docs/namespaces/default.html
Just so to be clear since you mentioned the class!
I am not trying to show the image for paid members visitors here. I want to add an image for the member profile for any user to see when they land on their profile page.
If you are not familiar with the above tag, do you have a suggestion how I can display an image icon for user profiles of custom role?
Many thanks