I am a novice in WordPress theme development. I am trying to build a custom Code menu widget for the footer, which is totally different from the default menu widget provided by the WordPress, but I could not understand from where to start. The best will be If I can find the default widget created by the WordPress. I can get some clue and move on.

I have created this with the help of some videos on YouTube →

class chimp_footer_menu extends WP_Widget {
function construct() {
    //Create Widget
        __('The Footer menu Widget','text_domain'),
        array( 'description' => __('A Footer Menu Widget', 'text_domain' )));


// Front End display
public function widget($args, $instance) {


// Backend Form
public function form($instance) {
    if (isset ($instance['title'])) {
        $title = $instance['title'];
    else {
        $title = __('New Title','text_domain');

// Update Widget Values
public function update($new_instance, $old_instance) {}


add_action('widgets_init', function(){
  • 1
    The location is /wp-includes/widgets/class-wp-nav-menu-widget.php. Apr 28, 2017 at 4:54

1 Answer 1


You will find the source of Custom Menu widget in /wp-includes/widgets/class-wp-nav-menu-widget.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.