Forum Replies Created
-
In reply to: Remove search bar
This is the basic code. There’s plugins to do it but I prefer to put this in my functions.php
add_action('init', 'remove_admin_bar'); function remove_admin_bar() { show_admin_bar(false); }
However I prefer to only remove it if the user isn’t logged in:
add_action('init', 'remove_admin_bar'); function remove_admin_bar() { if (!is_user_logged_in()) { show_admin_bar(false); } }
Or if you prefer to limit by user roles and editing capabilities.
function remove_admin_bar() { if (!current_user_can('administrator')) { show_admin_bar(false); } }
FYI: There’s a pretty popular search result recommending this for role check:
add_action('init', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } }
This would check to see if the user is in the admin portion in which case you’d show the bar as well.
In reply to: Removing the Status Bar in ForumsI’m using 2.3.2 and this is my solution.
There’s a function in the theme files calling this, simply noting it out or deleting it prevents the call.
// bbp_single_topic_description();
content-single-topic.phpand
// bbp_single_topic_description( array( 'topic_id' => bbp_get_topic_id() ) );
form-topic.phpThis makes more sense to me because why generate the HTML just to bloat your CSS file to hide it? Or why add more to your functions.php file when all you need to do is some basic theme work? (Although that was some clever hacking of the wordpress/bbpress hooks there mindyjoy :))
*Make sure to move all your theme files into your wordpress theme (wp-includes/themes/your_theme/buddypress/) so you don’t lose your work with an upgrade.