For A Shadier Tomorrow

Remove Website Input Field From WordPress Comment Form

Some people feel that they don’t need those “Website” input field inside the comment form

This time we will learn how to remove those Website input field which by default is provided inside WordPress comment form.

This little snippet was requested by a friend of mine who said he don’t need the Website input field and looking for a method to banish the thing into oblivion. I didn’t get to ask why he would want to do that, but I still would lend him a hand. I’m such a good guy… so why am I not popular? #orz

The code

add_filter('comment_form_default_fields', 'shadythemesWebsiteBanisher');
function shadythemesWebsiteBanisher($fields){
	if(isset($fields['url']))unset($fields['url']);
	return $fields;
}

Put the code somewhere inside your theme’s functions.php or use it as a plugin.

Now you can kiss goodbye to your Website input field in your comment form!

Write a comment

Your email address will not be published. Required fields are marked *

About ShadyThemes

ShadyThemes is a shady group for hire.

We build shady websites using shady tools for whatever shady purpose the shady clients has in their shady mind.

As you may have guessed, everything you see around ShadyThemes website is coded by us, so I guess you can see them as our portfolios.

Just send us a message if you need our service.

Contact Form

Sounds like the only thing worse than not being married is being married.