How to Link Widget Titles in WordPress without using a plugin

By default WordPress does not accept hyperlinks in the widget title.  Even if you enter a hyperlink , it will strip down all the html tags  and simply print out the text.  So basically in order to link the widget titles, we’ll need to find a way to make WordPress accept html in Widget Title.

The Snippet

Here is a little snippet which lets you add a hyperlink in the widget title. The snippet  makes use of widget_title filter and it will dynamically replace custom tags with actual html tags. You can use the Code Snippet plugin to run this piece of code.

So now basically we can enter hyperlinks as [link href =]My Widget Title[/link] in our widget title. Take note that we have entered the url without quotes. 

This little snippet will make the widget title clickable. If you are not comfortable with coding then  you can also achieve the same result by using plugins like Widget Title Links

11 thoughts on “How to Link Widget Titles in WordPress without using a plugin”

  1. Hi, Is there a way to apply CCS to the clickable widget title created by using the snippet above? Specifically, I need to change the text color. Thanks. Amy B.


Leave a Comment