You can work around that by passing widget_title
through a filter :
function custom_widget_title( $title ) {
$title = str_replace( '__br__', '<br/>', $title );
return $title;
}
add_filter( 'widget_title', 'custom_widget_title' );
Now use __br__
in your widget title instead of <br/>
and the code will replace it.
Note: You need to put the code in your theme’s functions.php
file.
Related Posts:
- Add copies of the same text widget instance to multiple sidebars
- Can the new 4.8v text widget visual editor be removed?
- How to display custom widget anywhere
- Is There A Hook To Process The Content Of The Text Widget?
- Add New Footer Widget Area with Limited Options?
- Custom shortcode in widget forced to top of widget
- Different “Text Widgets” in Sidebar on Many Different Pages?
- How to allow PHP In WordPress text widget
- How to use shortcodes on a widget sidebar when doing an ajax call?
- wordpress widget textbox in the sidebar
- How to change text widget title h2 to h1
- Font awesome Icon HTML in widgets disappear on save
- Text Widget Links Not Working
- When adding a widget, what kind of widget should I used to add images and text and styling?
- Plugin translations not installed but… strings are translated!
- Creating a widget with a number of custom fields
- Extending the WP_Widget_Text class
- Script Code in Text Widget Does NOT Show
- Adding Shortcode to Text Widget
- WP – Genesis – How to get the content of a widget in php? [closed]
- Help With Custom Image and Text Widget
- Text widget doesn’t save the content
- Filter widget outputs
- Widget without DIV wrapper
- Widget on the right side of the page overlaps with the left side [closed]
- Widget not displaying in WMPU sites
- How to make widget title accept php?
- Change The Woocommerce Product Categories Dropdown Widget Placeholder Text
- Widget back end radio button issue
- Hook called before text widget save
- Can’t Write Custom Widget Code In One ECHO
- Widget Text Needs to be White [closed]
- Passing user enetered value in widget: number of words, for example
- How to add custom tinymce plugin to new text widget
- Shortcode inside text widget do not call enqueue style
- WordPress Widget Not Saving Instance
- Input with pattern not working
- How to add WordPress Settings in sidebar widgets
- Custom CSS for a particular text/html widget in WordPress
- accessing wordpress serialized data outside wp
- How to add a recent post function to a text widget I created for practice?
- I want a widget to appear on only one page
- How to change widget title in wordpress version 5.8.1?
- How to run php code only for a specific widget on a page and not all widgets on that page?
- How to get individual values from custom widget?
- Need to add custom text field to Woocommerce under add to cart button
- Change values on several pages
- Text widget is placing everything side by side. I want to post it above
- Allowing HTML elements in title widgets spacing problem
- Let custom text widget use the same font as the theme
- Title not Emptying in a Widget
- How to use the filter ‘widget_text’ to a particular text widget with id
- Default WordPress widgets always appear
- Custom widget not appearing on front end
- can’t edit widgets after moving from subfolder to root
- Loading shortcode stylesheet only when shortcode is in text widget [closed]
- Display widget outside sidebar?
- How to use wp query posts with current post meta value in text widget
- Widget Disappearing in IE
- Add New Footer Widget Area with Limited Options?
- Rollover button doesn’t appear in sidebar [closed]
- Adding more information to a Content Product Category
- Text Widget Not Working
- custom css in one page
- Disappearing Widget Text area
- Link from outside website or another page to a text widget title