• Hi,

    i have a question. I need a custom widget and i want to add in my child theme.

    But how can i add the custom widget that i can use it in the admin interface. I have createt a class which extends from WP_Widget and a registered the widget in the functions.php

    function register_my_widget() {
    register_widget( ‘widget_simple’ );
    add_action( ‘widgets_init’, ‘register_my_widget’ );

    But where should i put the class file? That it works?

    Thanks for help

    Peter

The topic ‘Add a widget’ is closed to new replies.