How to enable and disable HTML tags for wordpress comments

Source: Internet
Author: User
Tags comments html tags php file php and


Let's introduce how to enable WordPress to support html tags.

Open wp-nodes des/comment-template.php and find the following code: if not commented out, it is the status of open:

The code is as follows: Copy code
1. <? Php echo $ args ['Comment _ notes_after '];? >

Comment it out to disable this function:

The code is as follows: Copy code
1. <! -- <? Php echo $ args ['Comment _ notes_after '];? > -->

We do not recommend that you delete it directly. If you want to change it back, it is more convenient. After all, the specific effect must be changed before you can know it.

Remove "you can use these HTML tags and attributes ...... "Prompt
 
By default, a message is displayed below the WordPress comment box:

You can use these HTML tags and attributes:

The code is as follows: Copy code
<A href = "" title = ""> <abbr title = ""> <acronym title = ""> <B> <blockquote cite = ""> <cite> <code> <del datetime = ""> <em> <I> <q cite = ""> <strike> <strong>

Sometimes looks pretty bad, if you want to remove can modify/wp-des/comment-template.php file, find: <? Php echo $ args ['Comment _ notes_after '];?


, Comment out or delete it. But the comment-template.php is a WordPress core file and will expire if you upgrade WordPress with all the modifications. The best way is to modify the topic file.

Find the comment. Php file of the topic and find

Comment_form ();

Replace it:

Comment_form (array ('comment _ notes_after '=> ''));
If the topic is not standardized, it may not be found.

Comment_form ();
Statement. Modify the theme style.css style sheet and add the following at the end:

Form-allowed-tags {display: none ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.