• Hi,

    I would like to create a sidebar menu from the Pages widget of WordPress. I looked into the widgets.php, but could not find the part which generates the pages HTML code.

    To be more specific I would like to remove the “Pages” title of the widget. (So it would consist of the links only)

    Could you please help finding out where to modify the php?

    Thanks,

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes, the widget code is a bit elusive if you don’t know where to look. You should find it in wp-includes/default-widgets.php. But do not edit this file! You will regret it. Instead, copy the widget class code to either functions.php (preferably of a child theme) or create a simple plugin to contain the code (or add it to a site specific plugin you already have). Change the widget name, modify the code as needed, and register the widget under its new name. It will show up on the widgets page along with the default, simply use your version instead of the default.

Viewing 1 replies (of 1 total)
  • The topic ‘Edit Pages widget’ is closed to new replies.