Hi, I’ve seen that the Welcome Widget was hiding the “join” button if the user is logged.
That’s nice…
But I would like to hide it completely (not just the button) if the user is logged.
I searched a little and found this :
//removes welcome widget if user is logged
function unregister_widgets() {
if (is_user_logged_in())
unregister_sidebar_widget(‘BP_Core_Welcome_Widget’);
}
add_action( ‘widgets_init’, ‘unregister_widgets’);
The problem it’s that I can’t make it work. It is still there.
I also did try with
unregister_sidebar_widget(‘Welcome’);
but this don’t work either.
How can I do ?
My solution actually is to hide it with css but I don’t like that…
(or maybe this feature should be added in the widget !)