Forum Replies Created
-
and thank you beforehand, @danbp
One question. I’m trying to remove some menu items, but it only works if I add 2 different codes to functions.php and bp-custom.php.
This one goes to functions.php
function exclude_tab_if_not_personal_profile() { if ( ! bp_is_my_profile() ) { bp_core_remove_nav_item( 'friends' ); } } add_action( 'bp_init', 'exclude_tab_if_not_personal_profile' );
And this one to bp-custom.php
function bp_remove_nav_item() { global $bp; bp_core_remove_subnav_item( $bp->profile->friends, 'change-avatar' ); } add_action( 'wp', 'bp_remove_nav_item' );
>>>>>>>>>>>>>>>
It works… but1. The “friends” tabs appears in the profile (top navbar), and I just need it to appear in the profile menu (sidebar).
2. Adding this piece of code for removing MORE items do nothing.
The combination I used for bp-custom.php.function bp_remove_nav_item() { global $bp; bp_core_remove_subnav_item( $bp->profile->friends, 'change-avatar' ); bp_core_remove_subnav_item( $bp->profile->forums, 'change-avatar' ); bp_core_remove_subnav_item( $bp->profile->media, 'change-avatar' ); } add_action( 'wp', 'bp_remove_nav_item' );
and for functions.php
function exclude_tab_if_not_personal_profile() { if ( ! bp_is_my_profile() ) { bp_core_remove_nav_item( 'friends' ); bp_core_remove_nav_item( 'forums' ); bp_core_remove_nav_item( 'media' ); } } add_action( 'bp_init', 'exclude_tab_if_not_personal_profile' );
Thanks, I would really appreciate any help, as apparently none of solutions found on this forum worked for me.
This first lines don’t go, sorry:
@ini_set(‘display_errors’,’Off’);
@ini_set(‘error_reporting’, E_ALL );[Solved] Just needed to put this code at the BOTTOM, not after define( ‘WP_DEBUG_DISPLAY’, false );
Here is my code:
@ini_set('display_errors','Off'); @ini_set('error_reporting', E_ALL ); define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); define( ‘WP_DEBUG_DISPLAY’, false ); /* That's all, stop editing! Happy publishing. */ /** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __FILE__ ) . '/' ); } /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php'; @ini_set('display_errors','Off'); @ini_set('error_reporting', E_ALL );
Hope this helps somebody.
Cheers, and thanks!
I just want to disable any error message visibility (in pages, not a LOG). Cause this errors seems to cause no problem to cover image uploading, everything works like a charm, thank you for BuddyPress!!!
Hello @vapvarun, thank you for your reply. I already have this same code:
define( ‘WP_DEBUG_DISPLAY’, false );
@ini_set( ‘display_errors’, 0 );so my code looks like this>>>
define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); define( ‘WP_DEBUG_DISPLAY’, false ); @ini_set( 'display_errors', 0 ); /* That's all, stop editing! Happy publishing. */
But it makes no difference.
Thanks.
Hello @mfalk75, one question, where did you put this code? I don’t have a “css” folder in mythemes/buddypress, should I create one first? And then… copy a buddypress.css file there and make the changes… Sorry, I probably miss something.
Thank you!
Cheers,
Ilya