Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Adding/Copying new widget..


Erwin Gerrits
Participant

@egerrits

Copy bp_core_widget_members() and bp_core_widget_members_control() functions from the file bp-core-widgets.php into a new file. Rename the widget functions from “members” to “newmembers” or whatever. Remove everything in the div “item-options” if you don’t need ajax option choices.

Add these two lines to the end of the file:

register_sidebar_widget( __(‘New Members’, ‘buddypress’), ‘bp_core_widget_newmembers’);

register_widget_control( __(‘New Members’, ‘buddypress’), ‘bp_core_widget_newmembers_control’ );

Save the file as “newmembers.php” into mu-plugins. Next time you login the widget will be listed on the widgets page ready to be placed on the front page.

Skip to toolbar