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

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.