What is the standard file for creating a custom widget in WordPress Themes?

I want to change some parts of a custom widget of a WordPress theme. But I don’t find it. The most wordpress themes have common places/files for the same functions. So I find the header under header.php normally.

Where can I find the definition of a custom widget normally?

Related posts

1 comment

  1. There is no standardised file for a widget like there is for a header. Widgets aren’t strictly theme based and don’t fall under the template hierarchy.

    The easiest way to find the widget you’re looking for would be to do a search for WP_Widget. All widget classes will extend the WP_Widget class.

    E.g.

    class My_Widget extends WP_Widget {

Comments are closed.