Community Forums › Forums › Design Tips and Tricks › Removing Website from Comments
This topic contains 5 replies, has 3 voices, and was last updated by braddalton 1 month, 3 weeks ago.
-
AuthorPosts
-
February 2, 2013 at 3:11 pm #17413
Is there a way of removing the website field when someone is leaving a comment?
February 2, 2013 at 3:32 pm #17431I have found a solution with this code added to the functions.php file.
add_filter( ‘genesis_comment_form_args’, ‘url_filtered’ );
add_filter( ‘comment_form_default_fields’, ‘url_filtered’ );
function url_filtered( $fields ) {if ( isset( $fields['url'] ) )
unset( $fields['url'] );if ( isset( $fields['fields']['url'] ) )
unset( $fields['fields']['url'] );return $fields;
}March 30, 2013 at 10:04 am #32087I read that there is a way to do it from the CSS but I can’t make it work :S
What you have to write in the stylesheet is:.comment-form-url {display: none;}
Anyone who get it work?
March 30, 2013 at 12:47 pm #32117https://gist.github.com/braddalton/5246988
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.March 30, 2013 at 3:42 pm #32136Perfect, working like a charm! Thanks a lot. My question is, adding code to the functions.php don’t make the site run slower than adding some modifications (when possible) to the CSS?
March 31, 2013 at 3:34 am #32211In my opnion, It depends on what the code does and how effecient it is.
No doubt poor coding can slow down a site.
Moved a site to Genesis recently and recoded it reducing the database from over 30 mg to 3 mg and it loads 5 times faster.
Another example of this is PHP and CSS coding best practices.
Someone contacted me recently about thier site which takes 8 seconds to load and contains only 120 posts hosted on good managed servers. The problem is they have hacked the core WordPres files, the parent themes files and many of the plugin files and cannot update without a major recoding effort.
When you use Genesis, you’re always advised to use a child theme for custom coding rather than modify the parent themes template files. This way you can painlessly update the parent theme which is becoming more and more effecient.
My own sites home page loads in about a second which wasn’t the case when using another theme but the server configuration and other factors can also make a huge difference.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered. -
AuthorPosts
You must be logged in to reply to this topic.