PHP Code To Modify The Widget Title of Any Widget

This PHP code enables you to modify the widget title of any widget native to WordPress or any Genesis widget. You can also change the value for the $id_base to match any widget which enables you to modify any widgets title.

Note : The code only works if you have manually added a title to the widgets Title field.

The filter is included in the WordPress core files located in wp_includes/default-widgets.php.

The filter also enables you to modify the default output of every setting in every widget.

Listed below is the code for every WordPress widget and Genesis widget.

You can simply add any of these code snippets to your child themes functions file to change any widget title in WordPress including any theme specific widgets like Genesis Featured posts widget etc.

Related Code Snippets

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.