This code will set the title to an empty string if it is set to Recent Posts
(Which as you noted, is what the Recent Posts widget will set the title to if it is empty):
add_filter( 'widget_title', 'wpse_widget_title', 10, 3 );
function wpse_widget_title( $title, $instance, $id_base ) {
if ( 'recent-posts' === $id_base && __( 'Recent Posts', 'text_domain' ) === $title ) {
$title="";
}
return $title;
}
Another workaround is to set the title to the HTML entity for a space,
in the widget editor.
Related Posts:
- Code for Recent Posts Widget
- Modify recent post sidebar to show post thumbs with out plugins
- Modifying recent post widget to include icons for post titles
- Add thumbnail to recent posts widget using filters
- Display the date before the post title in recent posts widget
- Change recent posts widget title
- How to truncate titles in Recent Posts widget?
- Customizing wordpress default widgets?
- How to output only blockquotes content from recent posts in a widget?
- How do I add a small excerpt of a blog post on my Front Page Recent Posts widget?
- Display Most Recent Post Widget Title On Page
- Recent Posts Widget URL / Domain change
- Paginate recent posts widget
- Author Link in Recent Posts Widget
- Recent posts with different class name for each post and a scrollbar?
- How to listen to color changes on the color picker?
- Add New Footer Widget Area with Limited Options?
- Add div class to only one widget
- How to use control_callback when creating a widget via functions.php or plugin?
- Call sidebar from a template
- Widget Area: Modify $param[‘xy’] from widget-$n
- Widget area inside a widget
- Defer Code in Widgets – Page Speed
- Where are widget configurations stored?
- How to limit wp_get_archives to show months for the X years only
- Bolding specific word(s)/parts of widget title
- Pass variables from one widget to another widget
- Remove the widgets tab from theme customizer
- Remove/Add widgets from/to the Available Widgets pool
- Remove/Unregister or hide a widget added by a plugin
- Create a widget that allows text input
- Subscribe2 widget with choosing categories?
- jQuery UI inside widget on admin page
- How do I add a widget from an Android phone?
- Error gets thrown when calling require_once on widget.php
- Check if the current shortcode is being used in a widget
- How to activate or install the Gallery Widget?
- Custom User Field in Dashboard Widget
- Getting a div wrapped around two widgets
- How to create a widget that accepts html input?
- Widget changes in customizer ajax error to many options?
- Widgets not adding div on before and after title
- Dynamically add content to an existing widget area
- Issue understanding and using WordPress filters and actions
- How can I inject html after the [x]th widget inside a Sidebar? [duplicate]
- RSS dashboard widget not showing visuals
- Simple widget causing whitescreen
- How to stop comments widget conflicting with theme comments
- How do I create a widget to embed the code for a sign up form, so that the sign up form appears on every page?
- Tabs and Category Widget
- Grabbing how Many Posts by Month for a Dashboard Widget
- How to change the default class for the widget title?
- How to add the same widget twice?
- How to hide widget if current category has no posts assigned to it?
- wp_dropdown_pages in widget form
- Unable to load “wpColorPicker” on theme customize page
- Undefined Variable in my widget
- Update widget form after drag-and-drop “only specific plugin”
- How do I create a template page with a specific widget as the content?
- Placing a widget with $wpdb query
- Loading the native WordPress image uploader in custom widget
- Ampersand breaking Widget title
- How to allow editing of text in sidebar?
- Shortcode into widget
- Creating a dynamic class name in my custom widget
- Want to add more option in “Sexy Login”
- How to show avatar of current logged in user in a widget
- Got a problem with a widget
- Widget control – putting a slideshow in the widget area
- WordPress Local to Live and The Missing Widgets!
- Extending the WordPress Recent Posts Widget
- delete widget upon uninstall
- Unable to see Widget Submenu under Appearance with Class Based WP_Widget
- How to update a widget data?
- Recently changed domain name. Home page widgets are now not in the customize menu yet still being on the page
- I accidentally added a widget area called sidebar 1
- wp_registered_widgets doesn’t contains my widgets
- How can I write this code snippet so that it echo’s the response when submitting empty fields?
- What is the difference between widget object and widget instance?
- How Can I Replicate & Register a Widget from the Child Theme
- How to retrieve category ID’s from widget settings?
- My plugin works in home page, but doesn’t work in post page
- Widget text color change
- How to create another widgets.php page
- widget that will do shortcodes that user inputs
- Disable wordpress widget automatically on error
- Widget dynamically add new input field
- Widget Development – Displaying dropdown content
- WordPress function breaks widget’s markup?
- Registering multiple copies of a widget
- How do I stop out of stock items from appearing on my WooCommerce site when using the Layered Nav widget [closed]
- menu in different page in different style
- Add text to Text Widget using Javascript
- Widget logic not working
- Subpages menu on sidebar plus widgets
- Widgets in PHP files?
- Text Widget Not Working
- Sample widget code which get data(1-5 record) from Wp_Admin panel and display to Homepage(WordPress Custom Theme)
- Unable to add options on dashboard widget ?
- is it possible to create custom widgets page in admin?