Comments - Unlinking website URL
Get help or discuss with other members about business Joomla! 3 and 2.5 template designed especially for your start-up projects on dedicated support forum.
- GK User
- Sun Oct 27, 2013 1:25 am
Hello,
Using the WP Startup theme and I think it's awesome.
When a user leaves a comment, their Name is automatically linked to the website URL that they enter. How do I remove the link? Or even better yet, (without modifying core code), how do I remove the Website URL option from the comments form?
I'm trying to make it less enticing for spammers to spam my comments.
thank you !!
Using the WP Startup theme and I think it's awesome.
When a user leaves a comment, their Name is automatically linked to the website URL that they enter. How do I remove the link? Or even better yet, (without modifying core code), how do I remove the Website URL option from the comments form?
I'm trying to make it less enticing for spammers to spam my comments.
thank you !!
-
- Fresh Boarder
- GK User
- Sun Oct 27, 2013 9:24 am
To get rid of site link in comments (displaying), please edit file:
/wp-content/themes/Startup/gavern/helpers/helpers.layout.fragments.php
find:
and change to:
/wp-content/themes/Startup/gavern/helpers/helpers.layout.fragments.php
find:
- Code: Select all
<?php
printf(
'<span class="author">%s</span>',
get_comment_author_link()
);
?>
and change to:
- Code: Select all
<?php
printf(
'<span class="author">%s</span>',
get_comment_author()
);
?>
-
- Moderator
- GK User
- Sun Oct 27, 2013 9:27 am
To get rid of website field in add comment section, edit the file:
/wp-content/themes/Startup/functions.php
and modify its end to this form:
/wp-content/themes/Startup/functions.php
and modify its end to this form:
- Code: Select all
// this action enqueues scripts and styles:
// http://wpdevel.wordpress.com/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/
add_action('admin_enqueue_scripts', 'gavern_enqueue_admin_js_and_css');
add_filter('comment_form_default_fields', 'url_filtered');
function url_filtered($fields)
{
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}
// EOF
-
- Moderator
- GK User
- Sun Oct 27, 2013 9:29 am
Whats might be more important - most of the spambots doesn't fillut the form but use automatic submission. I would consider using akismet (no matter what You see while registering API key, it can be registered for free ) which takes away most of the spam entries.
-
- Moderator
4 posts
• Page 1 of 1