Home › Forums › Backend Issues (wp-admin) › How to register multiple widgets correctly? › Reply To: How to register multiple widgets correctly?
I think you’ll need to change some items; I’ve marked them with “CHANGE_THIS”.
class CHANGE_THIS extends WP_Widget
function __construct() {
parent::__construct(
'CHANGE_THIS', // Base ID
__('CHANGE_THIS', 'domainname'), // Name
array( 'description' => __( 'Email, phone, FB link', 'domainname' ), ) // Args
);
}
add_action( 'widgets_init', function(){
register_widget( 'CHANGE_THIS' );
});
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.