Hola amigos!

It’s been quite some time that I posted something technical. So here is a post for you all. This one is related to WordPress (hosted on your own server or just trying out locally).

I was an intern at Hangrr – Business, Leadership and Marketing Program, where we had to set up our own website. We chose WordPress as our back-end. You can visit our website here.

While we were deciding on the themes and the slider plugin on the homepage, we had to make sure that we have contact us forms and the users should be able to leave comments on the articles too. When we were working on comments form we came across some extra text being displayed on the page which was unnecessary and was related to HTML tags something like this —

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

HTML content below Comments form
HTML content below Comments form

To remove this just add the following code under Custom CSS and voila! your website and comment form is clean and simple.

Go to Dashboard->Appearance->Theme Options->Other->Custom CSS

#respond form p.form-allowed-tags {
display: none;
}

Then click on save options.

Alternate method: You can also add the following css code in your stylesheet (style.css) file.

Go to Dashboard->Appearance->Editor->style.css (on right side bottom corner)

.form-allowed-tags {
display: none;
}

Click on update file after adding the code.

[Screenshot] After adding the code:

Comment Form after removing HTML tags
Comment Form after removing HTML tags

Q. Where to add the code in style.css?
Ans. It’s quite simple, almost all the themes have comments in their source files for better understanding. You might find something like this in your style.css

/* =Content
----------------------------------------------- */

You can add the code first thing below this comment or you can place it at the end of the file to find it easily in future.

Let the Windows be open, and feel the Freedom.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s