WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove You may use these HTML tags and attributes (28 posts)

  1. humbleopinion
    Member
    Posted 3 years ago #

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    depends on your theme....

    does your comments.php have the comments form coded into it? If so, it should be in there....

    or does it use <?php comment_form(); ?>?

  3. humbleopinion
    Member
    Posted 3 years ago #

    The theme says: <?php comment_form(); ?>
    I assume that is wordpress.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    yup....here's more info about how comment_form works:
    http://devpress.com/blog/using-the-wordpress-comment-form/
    my first guess is to do this:

    <?php comment_form(
    	array(
    		'comment_notes_after' => ' ',
    	)
    ); ?>

    to get rid of that (in place of the line you have now).... but I'm not totally sure so I'll look into it some more, but you can try that....

  5. humbleopinion
    Member
    Posted 3 years ago #

    Thanks Rev....I did find this in the comment-template:

    'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' ' . allowed_tags() . '' ) . '</p>',

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    looks like if the above doesn't work...

    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;
    }

    added to functions.php will

  7. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    I did find this in the comment-template:

    in the comment-template in your theme? Or in Wp core?

    If in your theme, you can delete/comment out..... if in WP core, don't edit that. You'll lose your changes on an upgrade (also....if you are using twentyten theme we would need to make a child theme...as any changes to twentyten theme get lost on upgrade)

  8. humbleopinion
    Member
    Posted 3 years ago #

    Rev, the comment-template in the wp files. I am using the swift theme. Love it, but there is too much to configure! I believe it use to have its own comment files, but not anymore.
    Thanks for the info!

  9. humbleopinion
    Member
    Posted 3 years ago #

    Where would I add this to the function.php?

    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;
    }

  10. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    Anywhere. As long as its inside of the opening and closing tags that are already most likely in your functions.php, and you don't just plop it in the middle of another function....

  11. humbleopinion
    Member
    Posted 3 years ago #

    lol Thanks, no plopping in the middle of another function. This is getting to be very complicated! :)

  12. humbleopinion
    Member
    Posted 3 years ago #

    Well, it didn't work. Tried it twice. I will have to check out the swift theme site and see if there is an answer over there!

  13. humbleopinion
    Member
    Posted 3 years ago #

    FINALLY figured it out! in the comment php, I had to replace this:
    <?php comment_form(); ?>
    with this: <?php comment_form(array('comment_notes_after' => '')); ?>

    This works for the swift theme!

  14. 1saleh
    Member
    Posted 3 years ago #

    ^
    And work with me in evolve theme also :)

    Thanks !

  15. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    @humbleopinion

    lol.... See my 1st suggestion in post 4, which would be the exact same code you came up with!

  16. Bob Rademaker
    Member
    Posted 3 years ago #

    @humbleopinion

    Worked like a charm!

  17. robelings
    Member
    Posted 3 years ago #

    thanks guys - <?php comment_form(array('comment_notes_after' => '')); ?> works for me ... ;)

    ciao
    Rob

  18. wpmirwin
    Member
    Posted 3 years ago #

    @ Rev. Voodoo.

    Thanks! I used your code, and dropped it into my theme's functions.php as suggested. This is the cleanest way to handle it. Thanks!

    Mike.

  19. rwilki
    Member
    Posted 3 years ago #

    @Rev. Voodoo, great code! Thanks so much. Took me 30 seconds...

  20. Farhan Abadi
    Member
    Posted 3 years ago #

    @Rev. Voodoo
    it works for me too... I use SWIFT theme. thanks.

  21. apnawaqas
    Member
    Posted 3 years ago #

    Thanks every1, it works....
    :D

  22. ebuali
    Member
    Posted 3 years ago #

    <?php comment_form(array('comment_notes_after' => '')); ?>

    You cant even imagine how it helped me !

    Thanks a lot...

  23. gonghaima
    Member
    Posted 3 years ago #

    <?php comment_form(array('comment_notes_after' => '')); ?>
    Brilliant, it took me whole day yesterday to tackle the problem. I have been went through every files in cPanel, and couldn't find and delete those annoying words in comments.

  24. dorr4wp
    Member
    Posted 3 years ago #

    FINALLY figured it out! in the comment php, I had to replace this:
    <?php comment_form(); ?>
    with this: <?php comment_form(array('comment_notes_after' => '')); ?>

    Worked in silent film theme as well thank you

  25. dante$$$
    Member
    Posted 3 years ago #

    humbleopinion:

    FINALLY figured it out! in the comment php, I had to replace this:
    <?php comment_form(); ?>
    with this: <?php comment_form(array('comment_notes_after' => '')); ?>

    This works for the swift theme!

    Yippee.. It`s work for my theme too..Thanks. :)

  26. deight
    Member
    Posted 3 years ago #

    It worked on my Senior Care Community Website! Thank you very much! You can't even imagine how long I've been looking for this simple line of code.

    Now, does anybody know how I change "Leave a Reply" above Comment Window to something else?

  27. webgrafter
    Member
    Posted 2 years ago #

    another way to do it with just css would be:

    .form-allowed-tags{
    display:none;}
  28. lanzen
    Member
    Posted 2 years ago #

    Hey, Webgrafter - your css code version is more elegant and works better where the comments.php line being replaced has a lot of attributes.

    Losing these can cause issues. For example my comments.php line had:

    <?php comment_form( array('label_submit' => esc_attr__( 'Submit Comment', 'TheCorporation' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a Reply', 'TheCorporation' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s' )) ); ?

    Quite a line. Shortening it made the text overflow the submit button, so the css fix let me keep this line and lose the html hints, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic