Support » Plugin: Posts in Sidebar » copyright icon in widget title

  • Resolved zapster_65


    I’d first like to say -thank you!!!
    This is an awsome piece of work – I love it!

    But I do have a problem with the widget-title.
    I need to place a copyright icon (‘®’-html-tag) into the title of the widget in ‘<sup> </sup>’ to make the icon smaller and place it in the right position. The icon itself shows up, but unfortunately the ‘<sup> </sup>’ got stripped off, so the icon shows up as large as a normal letter wich is not looking very nice. Is there a possibility to get around this problem?

    Thanks for the help.

Viewing 1 replies (of 1 total)
  • Plugin Author aldolat


    I’m happy you appreciate this plugin! 🙂

    About your question, for security reasons every input coming from the user must be sanitized, so it’s not possible to allow an HTML tag in the title. I’m very sorry for this.

    Anyway, there is a workaround that could be useful for you. Take note that this change will occur in every title of every widget.

    All titles of the widgets are passed through a filter, so you could filter (change) the output. We’ll add a symbol at the end of the title. Open the functions.php of your current theme and add these lines at the end:

    function add_something_to_widget_title( $title ) {
    	return $title . '<sup>®</sup>';
    add_filter( 'widget_title', 'add_something_to_widget_title' );

    When you add these lines, be sure to paste them before the closing PHP tag ?>, if any.

    Save the file and test it.

    Let me know.

Viewing 1 replies (of 1 total)
  • The topic ‘copyright icon in widget title’ is closed to new replies.