0

Image showing current comment form

As you can see in the picture: "Comment" label displays always in the same place. How can I remove it or customized it? I really don't know what function controls this label. Part of my comments.php looks like this:

<?php if ( have_comments() ) : ?>
        <ol class="commentlist">
            <?php wp_list_comments(); ?>
        </ol>

        <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :  ?>
        <nav id="comment-nav-below" class="paged-navigation contain">
            <h1>Comments Navigation</h1>
            <div><?php previous_comments_link('Older Comments'); ?></div>
            <div><?php next_comments_link('Newer Comments'); ?></div>
        </nav>
        <?php endif; // check for comment navigation ?>
    <?php endif; ?>

    <?php if ( comments_open() ) : ?>
        <?php comment_form(); ?>
    <?php elseif ( have_comments() ) : ?>
        <p class="comments-closed">Comments are closed</p>
    <?php endif; ?>

2 Answers 2

1

If you want to remove it, then find the part of your template file (probably index.php or loop.php) which refers to a comment-template and remove it, and also disable commenting in WordPress-settings (to disable use of comments.php from other pages).

If you want to style it, look for comment_form() or a similar function in functions.php (TwentyEleven calls it twentyeleven_comment(), and it controls the HTML output for the Commenting Form) and edit the HTML as you want. Then add any styles to style.css to change the appearance of the form (explained here: http://codex.wordpress.org/Styling_Theme_Forms#The_Comments_Form).

3
  • You should be able to simply use comment_form, this a 'core' function. However, it may be hidden inside another function depending on the theme you're using. Jan 16, 2012 at 21:41
  • yes but I'm making commments.php from scratch on new theme, and I don't see any function that can control this tag. It's really annoying. Jan 24, 2012 at 8:33
  • @user1089548 I commonly use comments.php too, and in loop.php I have some conditional code that at various points use comments_template('/comments.php', true);, which basically means it includes comments.php (which uses comment_form() within it).
    – OleVik
    Jan 27, 2012 at 23:58
-1

Shortcut: You could find the html-tag wrapped arround the word "comment" and set this style to the class or id in your style.css:

.comment-label {display:none;} 

But the best alternative is to make your own comments.php file to style your comments with.

Her is a post that may be helpful: http://www.darrenhoyt.com/2007/08/18/styling-your-wordpress-comments/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.