That is a premium plugin – you should ask the plugin author or whoever you paid for support.
What you want should be simple to do – but unless somebody here has also paid for that plugin, nobody will be able to give you a definitive answer.
unfortunately it seems the plugin author isnt a programmer? and was unable to help. I was wondering if there was a simple fix maybe a quick and simple conditional that I can use? something that sets the element to “display: none;” ?
After a lot of reading and playing around I turned this code
function prorevs_member_header() {
if ($GLOBALS['bp']->current_component == "reviews") {
return false;
} else {
?>
<div class="generic-button">
<a title="Add reviews for this user."
href="<?php echo bp_get_displayed_user_link() ?>reviews/">Add Review</a>
</div>
<?php
}
}
}
into this
function prorevs_member_header() {
if ( bp_is_my_profile() == 1 ) {
echo "";
} else {
if ($GLOBALS['bp']->current_component == "reviews") {
return false;
} else {
?>
<div class="generic-button">
<a title="Add reviews for this user."
href="<?php echo bp_get_displayed_user_link() ?>reviews/">Add Review</a>
</div>
<?php
}
}
}
It seems to work well. Is there a better way of doing it?
Is there a better way of doing it?
If we don’t have that plugin, we don’t know if there is a better way.
If that code is working for you, great.
bp_is_my_profile()
returns a boolean value. So all you need is:
if ( bp_is_my_profile() ) {
Brilliant will remove the extra fluff.
Thanks for the help!