Hey @pirrencode,
There might be a script that is blocking the <a> tags.
This issue mostly occurs from the theme’s end.
it’s weird as WordPress is positioning as user-friendly CMS and the most critical and useful tag is blocked.
Just to clarify, WordPress has nothing to do with it unless the core files of WordPress have been disturbed.
However, could you share the URL of the page where the issue is faced?
Thanks a lot for your answer!
I use intimate plus theme on my website:
https://www.templatesell.com/item/intimate-plus/
Hmm, so you think it’s theme blocking <a> tag. I will take a look more on theme related pages, but for now I didn’t find anything in functions.php or front_page_php. As far as I understand html tags are managed by a global variable in wordpress engine, something like “$allowedposttags”, but for widgets / sidebar.
Some remarks:
1. Actually now problem is not visible on website as I disabled all links in sidebar and widgets.
2. All links are working if you do preview in Admin panel, but as soon as you publish them on website they’re not clickable (blocked).
3. Links are not working on all related plugins as well in sidebars on frontpage, e.g. “Display page”, “Links”, “SA SLider” and other stuff.
-
This reply was modified 5 years, 4 months ago by
pirrencode.
Hey @pirrencode,
I visited your website, and as you said, all links are working fine.
Could you publish a section and share the URL where the link isn’t working?
@prabhatrai Dear Prabhat, thanks a lot for support.
I hardcoded function in functions.php and looks like it worked. Here’s the code. However I am not sure if it’s correct solution and won’t have any consequences. Maybe another solution should be chosen to allow links.
Code:
function allow_html_intimate_widgets_init() {
global $allowedtags;
$allowedtags['pre'] = array('class'=>array());
$allowedtags['p'] = array('class'=>array());
$allowedtags['code'] = array('class'=>array());
$allowedtags['strong'] = array('class'=>array());
$allowedtags['href'] = array('class'=>array());
$allowedtags['a'] = array('class'=>array());
}
add_action('init', 'allow_html_intimate_widgets_init',11);
-
This reply was modified 5 years, 4 months ago by
pirrencode.