I’m trying to output a link on the website, but wp_kses is not allowing it.
What am I doing wrong in $allowed_html array?

$allowed_html   =   array(
'a' => array(
    'href' => true,
    'title' => true,
),
'abbr' => array(
    'title' => true,
),
'acronym' => array(
    'title' => true,
),
'b' => array(),
'blockquote' => array(
    'cite' => true,
),
'cite' => array(),
'code' => array(),
'del' => array(
    'datetime' => true,
),
'em' => array(),
'i' => array(),
'q' => array(
    'cite' => true,
),
'strike' => array(),
'strong' => array(),
);

How to allow link?

Read more here: How can I allow link tags and attributes with wp_kses?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: