Forum Replies Created
-
Ok so oddly enough its working now, tbh im not sure what i did to fix it either :\
I changed WP_Debug to true but there is nothing coming up on the page
Im assuming you mean debug log in the browser? If so i went to the media library and loaded up the console, its not reporting any errors or warnings though
Anyone got anything on this? It is clearly buddypress that is causing this problem, which means that if i ever want to do anything with the media library I have to disable buddypress, which is going to be a no from me.
Problem solved, closed
It was working perfectly fine up until this though? just did it out of nowhere
Sent them a message, apparently you cant put it anywhere else on the page except in the nav bar. I need it as a simple contact button on the sidebar.
Bumping because i have been searching for something like this with no luck
Is anybody able to assist with something like this?
FIXED
Ended up nesting my original if code within a !bp_is_my_profile() if condition which worked.
Thanks for the light bulb moment @shanebp
Closed.
Okay so that seems to work alright, echoing YES on own profile and NO on other profile (and the opposite if i put !bp_is_my_profile(), it also doesn’t seem to mess up the layout just doing it like that so (somehow) when used in that small bit of code and only as !bp_is_my_profile (a true check works but its not what i need) the layout messes up.
https://gist.github.com/anonymous/53a6c1369a1ad21c7259a5d2f41da845
this is the code to display the number with **** to replace the last 4 digits, i am using JS to control the toggle of the number so when clicked will reveal the digits. It works like this but when i change the if statement to;
if (current_user_can('client') && !bp_is_my_profile())
it throws the entire profile page layout out of wack.
Probably should also this is what my code looks like for that
<td class="data"><?php bp_the_profile_field_value();if(23 == bp_get_the_profile_field_id()) { $phonenum = xprofile_get_field_data("Mobile Number"); $first_part = substr(preg_replace( '/\s+/', '', $phonenum ), 0,-4); $hidden_part = substr(preg_replace( '/\s+/', '', $phonenum ),strlen($first_part)); ?> <div style="cursor:pointer;"id="hidden-number" data-last="<?php echo $hidden_part;?>"><?php echo $first_part;?><span></span></div> <?php }?> </td>