• Hi all,

    I’ve got problem: I am using WordPress 5.5.3 can’t use any Links (a href tag) on front page, banners or even page content in front page and widgets (e.g. sidebar), because link tags are blocked.

    How to overcome this issue? I read a lot of forums and threads and didn’t find direct answer to this. Looks like I need to edit WP engine’s files.

    Actually, it’s weird as WordPress is positioning as user-friednly CMS and the most critical and useful tag is blocked. Almost each site requires link section, banners in sidebar and other interactive stuff.

    Will be glad for any support.

    BR

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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?

    Thread Starter pirrencode

    (@pirrencode)

    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?

    Thread Starter pirrencode

    (@pirrencode)

    @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.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Allow HTML link tags’ is closed to new replies.