Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author H?kan Wennerberg

    (@puffythepirateboy)

    By default the title will be outputted as it was written. If you want to change the behavior to be able to use HTML, you can do that by either creating a widget template in your theme, or make a small change in the default template.

    I will get back to you this weekend on how to accomplish both of these.

    Plugin Author H?kan Wennerberg

    (@puffythepirateboy)

    Sorry for the delay.

    To allow HTML for the title you will need to open the /wp-content/plugins/hw-image-widget/html/front-end.php file in a text editor.

    Comment out line 158:

    $instance['title'] = \apply_filters( 'widget_title', \esc_attr( @$instance['title'] ) );

    …by adding // in front of it like so:

    //$instance['title'] = \apply_filters( 'widget_title', \esc_attr( @$instance['title'] ) );

    But please be aware that this change will be lost the next time you update the widget.

    Thread Starter beachmat

    (@beachmat)

    Thanks for that. I can’t see that line in the file you specify. I’m on version 2.4 now by the way.

    Plugin Author H?kan Wennerberg

    (@puffythepirateboy)

    beachmat: Sorry, I gave the wrong filename. It should be hw-image-widget.php on line 158.

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