ExpertHelpExpertHelp
Checking sign-in status…
Web Design

How Can I Remove the 'You May Use These HTML Tags and Attributes' Message from WordPress Comments?

Asked Mar 22, 20112 views1 answer
Hi, I am using WordPress 3.1 with the standard theme, and I need help removing a line of text that appears after the comments box. The text states: "You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code><del datetime=&quot;&quot;> <em> <i> <q cite=&quot;&quot;> <strike> <strong></strong></em></code>. I tried editing the comments.php file, but my changes didn't take effect. Can someone guide me on how to properly remove this text from the page?

How to Remove "You may use these HTML tags and attributes" from Your WordPress Blog

If you're looking to remove the line of text that states "You may use these HTML tags and attributes" from the comments section of your WordPress blog, you're not alone. This message is generated by the WordPress comment form and can be removed with a few simple modifications. Below, I will walk you through the steps to achieve this, including troubleshooting tips and best practices.

Understanding the Comment Form

The line you're seeing is a part of the default WordPress comment functionality. It provides users with information on which HTML tags they can use in their comments. While this can be helpful, you may want to remove it for a cleaner look.

Step-by-Step Instructions

Step 1: Backup Your Theme

Before making any changes, it's essential to back up your theme files. This ensures that you can restore your site to its previous state if anything goes wrong.

  1. Go to your WordPress dashboard.
  2. Navigate to Appearance > Themes.
  3. Click on Theme Editor.
  4. Download the comments.php file or make a backup using a file manager.

Step 2: Locate the comments.php File

  1. In the WordPress dashboard, go to Appearance > Theme Editor.
  2. On the right side, find the Theme Files section and look for comments.php.

Step 3: Edit the comments.php File

  1. Click on comments.php to open it in the editor.
  2. Look for the line that contains <?php comment_form(); ?>.

Step 4: Modify the Comment Form

Replace the line:

<?php comment_form(); ?>

with:

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

This modification tells WordPress not to display the default notes after the comment form, effectively removing the HTML tags message.

Step 5: Save Changes

  1. After making the changes, click on the Update File button to save your modifications.
  2. Visit a post on your site to check if the message has been removed.

Troubleshooting Common Pitfalls

  • Changes Not Taking Effect: If the changes do not appear, ensure that you are editing the correct theme (especially if you have multiple themes installed).
  • Caching Issues: Clear your browser cache or any caching plugins you may be using. Sometimes, cached versions of your pages can show outdated content.
  • Child Themes: If you're using a child theme, make sure to make the changes in the child theme’s comments.php file.

Additional Options

If you prefer not to edit theme files directly, consider using a plugin for managing comment settings. Some plugins allow you to customize the comment form without touching code. Here are a few options:

  • WPDiscuz: A feature-rich comment plugin that offers extensive customization options.
  • Comment Form Customizer: Allows you to modify the comment form easily.

Best Practices

  • Keep a Backup: Always back up your theme files before making changes.
  • Test Changes: After making changes, test the comment feature to ensure it still works as expected.
  • Use a Child Theme: If you plan to make extensive changes to your theme, consider using a child theme to prevent losing your modifications during updates.

Conclusion

Removing the "You may use these HTML tags and attributes" message from your WordPress comments section is a straightforward process. By following the steps outlined above, you can achieve a cleaner comment form that enhances user experience on your blog. If you encounter any issues, refer to the troubleshooting section for guidance. Happy blogging!

Expert Answers
AS
Albert Shohez
Answered Mar 25, 2011
✓ Accepted
To remove the message "You may use these HTML tags and attributes" from your WordPress blog, you'll need to edit a specific file in your theme. Start by locating the `comment.php` file within your theme folder. Once you have that open, look for the line that reads `<?php comment_form(); ?>`. You'll want to replace that line with `<?php comment_form(array('comment_notes_after' => '')); ?>`. This change effectively tells WordPress not to display the default comment notes, which includes the HTML tags message. After making this adjustment, save the file and refresh your blog to see the changes take effect. This should solve your problem and give your comments section a cleaner look.

Still need help?

Connect with verified experts who can solve your problem today.