Support » Fixing WordPress » Remove HTML tags and attributes

  • cyberknight8610

    (@cyberknight8610)



    How do I remove this from the comments?-

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b>
    <blockquote cite=""> <cite>
    <del datetime=""> <em> <i> <q cite=""> <strike> <strong></p>
    <p>here is an article as any example-
    http://cyberduelist.com/yugioh-news/yu-gi-oh-5ds-vol-2-manga/</strong></em>

    `

Viewing 15 replies - 1 through 15 (of 34 total)
  • cyberknight8610

    (@cyberknight8610)

    something messed up here is the code-
    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    esmi

    (@esmi)

    cyberknight8610

    (@cyberknight8610)

    can you give me more info?

    cyberknight8610

    (@cyberknight8610)

    or can you help me figure out what comment plugin this website uses-
    http://www.yuginewz.com/2011/09/photon-shockwave-exclusive.html

    Roscius

    (@roscius)

    Adding this to functions.php should do the trick:

    /**
     * Remove the text - 'You may use these <abbr title="HyperText Markup
     * Language">HTML</abbr> tags ...'
     * from below the comment entry box.
     */
    
    add_filter('comment_form_defaults', 'remove_comment_styling_prompt');
    
    function remove_comment_styling_prompt($defaults) {
    	$defaults['comment_notes_after'] = '';
    	return $defaults;
    }
    cyberknight8610

    (@cyberknight8610)

    where do I add that?

    Roscius

    (@roscius)

    Or the easier path esmi suggested, search your theme files for comment_form() – at line 75 in comments.php in TwentyEleven and change it to

    comment_form(array('comment_notes_after'=>''));

    Roscius

    (@roscius)

    Add the first block to functions.php

    cyberknight8610

    (@cyberknight8610)

    ok so I add this-

    /**
     * Remove the text - 'You may use these <abbr title="HyperText Markup
     * Language">HTML</abbr> tags ...'
     * from below the comment entry box.
     */
    
    add_filter('comment_form_defaults', 'remove_comment_styling_prompt');
    
    function remove_comment_styling_prompt($defaults) {
    	$defaults['comment_notes_after'] = '';
    	return $defaults;
    }

    anywhere yo the functions.php file? sorry I am kinda new.

    Roscius

    (@roscius)

    No worries, yup, you can add it anywhere. Right at the bottom, might be a good plan so you don’t break any other code by accident.

    cyberknight8610

    (@cyberknight8610)

    ok thanks also do you know what comment plugin this website uses?

    http://www.yuginewz.com/2011/09/photon-shockwave-exclusive.html

    Verifying this works (found through google)

    @cyberknight8610 That’s a Blogger site (not WordPress). It’s blocked at my work so I can’t tell you what the comment form looks like but 90% of comment forms are built into the theme. The only free plug-in I can suggest is Disqus even though I don’t personally use it. So you can look at those to see if it’s got what your looking for?

    Hi all … another newbie here. I have the same issue with the Suffusion template. Any solutions you can offer??

    Another solution is just to hide the code. In your style sheet just put:

    #form-allowed-tags {
    	display:none;
    }

    Just to add to miotorocks’ suggestion, for my theme (may be different for you) the “form-allowed-tags” is a class, not an id, so you would have to use ‘.’ instead of ‘#’.

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Remove HTML tags and attributes’ is closed to new replies.