• I have searched high and low for some info on adding HTML to the widget titles (for example A tag or SPAN tag).

    It seems that this feature is not native to WordPress and it has been requested 2 years ago, and nothing happened.

    I dont want a plugin to allow for this functionality, since the functionality seems pretty basic and straightforward.

Viewing 4 replies - 1 through 4 (of 4 total)
  • YES.

    This is a simple thing to add, it seems. There are a lot of work behind trying to get the headings to Look right. Too bad its so hard to do. Have to go in coding it there. Takes a lot of time for the little detail it gives. And while a plugin that does this usually adds more stuff, still unnecessary to me.

    There is another plugin, a premium one, that gives this functionality and a real drag-n-drop editor instead of the current one. Makes it more usable for clients as well… but still unnecessary for this detail.

    https://bit.ly/1ayhqHS

    Simplest solution – don’t show the real title, and in your main widget text, create your own title using tags like <h3 class="widget-title"> Your Title <span>here</span> html</h3> A plugin like Enhanced Text Widget will allow this.

    If your still looking for a solution, try this:

    remove_filter( 'widget_title', 'esc_html' );

    By default, WordPress adds the following filters to the widget_title:

    • wptexturize
    • convert_chars
    • esc_html

    So you can remove them using the remove_filter() function

    @crgeary: I tried and it’s not working!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘HTML in widget title’ is closed to new replies.