WordPress is great for blogs, and of course commenting is an essential part of blogging. Your blog readers can post comments with HTML tags. For their convenience, you can display a list of all allowed HTML tags in the comments form using the following PHP code in functions.php:
Allowed tags: <?php echo allowed_tags(); ?>
Change Allowed HTML Tags
You can also change what HTML tags are allowed in your comments form.
Edit functions.php (located in your wp-content/themes/ directory) and append the following code:
/*
* only allow <strong>, <em>, pre, code, and <a href=""> tags
*/
add_action('init', 'my_html_tags_code', 10);
function my_html_tags_code() {
define('CUSTOM_TAGS', true);
global $allowedposttags, $allowedtags;
$allowedposttags = array(
'strong' => array(),
'em' => array(),
'pre' => array(),
'code' => array(),
'a' => array(
'href' => array (),
'title' => array ())
);
$allowedtags = array(
'strong' => array(),
'em' => array(),
'pre' => array(),
'code' => array(),
'a' => array(
'href' => array (),
'title' => array ())
);
}
If you enjoyed this post, make sure to subscribe to WP Mayor’s RSS feed.






ok,very goog thank you
Great blog.
great tutorrials are shared thanks for this
html color name