开发者

Wordpress: force not HTML escape in text widget?

I'm using Wordpress with the Twitter Pro widget, and I want to include a link in the title. (Actually an image and a link, but keeping the question simple...)

I'm using the following code in a Wordpress text widget in the sid开发者_运维知识库ebar.

[twitter-widget username="myname" items="5" hiderss="true" 
title="<a href='#'>My Title</a>" hidereplies="true"][/twitter-widget]

It works in my version of Chrome, but Firefox HTML-escapes the title, and I end up with:

<a href='#'>My Title</a>

visible to the naked eye in my sidebar.

What can I do? Is there a way I can force the browser not to HTML-escape this?

Thanks!


Check if your theme(functions.php) or widget has this code inside it:

add_filter('widget_text', 'do_shortcode');

since you are using shortcodes in widget which are not allowed by default in wordpress.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜