lukasgrijander
Member
Posted 2 years ago #
There is a messague in the comment section of autofocus. This message say:
You may use these HTML tags and attributes: <abbr title=""> <acronym title=""> <b>
<cite> <del datetime=""> <i> <q cite=""> <strike>
Powered by WP Hashcash
Any body knows hot to delete it?
Thanks!
lukasgrijander
Member
Posted 2 years ago #
you can see what i´m talking about at the end of this web
http://www.ntalberto.com/?p=463
regards
iistudios
Member
Posted 2 years ago #
You could try editing the comments.php file
<div id="form-allowed-tags" class="form-section">
<p><span><?php _e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'your-theme') ?></span> <code><?php echo allowed_tags(); ?></code></p>
</div>
lukasgrijander
Member
Posted 2 years ago #
this is all my comments php file. Y don´t know which part i need to modify.
thanks!!
[Code moderated as per the Forum Rules. Please use the pastebin]
iistudios
Member
Posted 2 years ago #
Delete the following as it appears to only echo the html info.
<p><span><?php _e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'your-theme') ?></span> <?php echo allowed_tags(); ?></p>
I tried it and it worked.
lukasgrijander
Member
Posted 2 years ago #
i have done it but the footer has been moved to the left side.
It doesn´t works. I would like to hide the hmtl message insted of delete it. Do you know the code for hide it?
thanks another time
lukasgrijander
Member
Posted 2 years ago #
For WP3;
You have to filter the arguments from the function function comment_form (wp-includes/comment-template.php)
I did it like this, addind this code in the functions.php of my theme :
function mytheme_init() {
add_filter('comment_form_defaults','mytheme_comments_form_defaults');
}
add_action('after_setup_theme','mytheme_init');
function mytheme_comments_form_defaults($default) {
unset($default['comment_notes_after']);
return $default;
}
I would like to hide the hmtl message insted of delete it. Do you know the code for hide it?
To hide the code, comment it out. To do this, put an opening <!-- and a closing --!> around the parts that you want to remove.
In your case, it would look something like this:
<!-- <p><span><?php _e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'your-theme') ?></span> <?php echo allowed_tags(); ?></p> --!>
See if that works,
MindBlender 3D
lukasgrijander
Member
Posted 2 years ago #
thanks but now doing this the buttom of POST A COMMENT has been moved, i´dont know what to do for hide the text wothoutmoving the buttom
thankyou very much!!!
Thanks grosbouff for your solution!
To hide it, just modify your theme's CSS stylesheet and add:
.form-allowed-tags { display: none; }
Otherwise grosbouff's method is good. You want to avoid editing the original WordPress files.
Elio Rivero
Member
Posted 1 year ago #
Just set 'comment_notes_after' to '' when you call comment_form
<?php comment_form(array('comment_notes_after' => '')); ?>
Go to the style sheet (style.css) & look for the following piece of code:
#respond .form-allowed-tags {
color: #888;
font-size: 12px;
line-height: 18px;
}
Now add the following towards the end:
display: none;
So that the final code looks like this:
#respond .form-allowed-tags {
color: #888;
font-size: 12px;
line-height: 18px;
display: none;
}
Let me know if this works.
Artur Bezerra
Member
Posted 1 year ago #
The content of a plugin to erase any thing in 'comment_notes_after' can be this:
function mytheme_init() {
add_filter('comment_form_defaults','mytheme_comments_form_defaults');
}
add_action('after_setup_theme','mytheme_init');
function mytheme_comments_form_defaults($default) {
unset($default['comment_notes_after']);
return $default;
}
But don't works on any theme. In the default theme "Twenty Ten", works fine, but in the Suffusion don't works. The theme overwrite this filter. What can I do to override the choices of the theme?
What hook can I use to overwrite options of the theme?
joeysnijders
Member
Posted 1 year ago #
@MarQ_ZA Thanks your trick work for me :)
After using grosbouff's suggestion above, WP will throw an error in debug mode (for testing themes.)
Undefined index: comment_notes_after in [...]/wp-includes/comment-template.php on line [...]
I believe this happens because in the comments template WP doesn't check first to see that each item in the the array exists. This isn't a big problem but when I'm developing a theme I shoot for zero errors.
So I am going to use Gouri's suggestion instead to use CSS to hide the text.