Back to Community

How to Customize or Remove the 'Leave a Reply' Link in Twenty Twelve

12 threads Sep 10, 2025 ThemeTwenty twelve

Content

A common topic among users of the Twenty Twelve theme is the management of the comment links, specifically the "Leave a Reply" or "X Replies" text that appears near post titles. Users often wish to remove this link, move its position, or change its text without disabling comments entirely. This guide explains why this happens and provides the most common solutions based on community discussions.

Why This Happens

The "Leave a Reply" link is a standard part of the Twenty Twelve theme's design. It is generated by WordPress core functionality and displayed by the theme's template files (like content.php) to encourage user interaction. Its placement is intentional, but it may not suit every site's design or user experience goals.

Important Preliminary Step: Use a Child Theme

Before making any changes to theme files, it is highly recommended to create a child theme. Editing the parent Twenty Twelve theme directly is not advised, as all modifications will be overwritten the next time the theme is updated. A child theme preserves your changes safely. Alternatively, a custom CSS plugin can be used for style changes.

Common Solutions

1. Removing the Link with CSS

If your goal is simply to hide the comment link from view while keeping the functionality intact, you can use CSS. This is the simplest and safest method.

Add the following code to your child theme's style.css file or to a custom CSS plugin:

.comments-link {
    display: none;
}

This will completely hide the element containing the "Leave a Reply" text.

2. Moving the Link's Position with CSS

Some users have reported success in moving the link from the left side of the post to the right using CSS. The following example code, shared by a community member, changes the appearance and position of the link. You can adapt the CSS properties to suit your needs.

.comments-link a {
    display: block;
    text-align: right;
    float: right;
    /* Add additional styling like padding, background-color, etc. here */
}

3. Changing the Link Text or Removing It via Theme Files

To change the text of the link (e.g., from "Leave a Reply" to "Add a Reply") or to remove it structurally, you must edit the theme's template files within a child theme. The relevant code is located inside the <div class="comments-link"></div> container in several files, including:

  • content.php
  • content-link.php
  • content-quote.php
  • content-image.php
  • content-aside.php
  • content-status.php

Procedure:

  1. Create a child theme and activate it.
  2. Copy the relevant template file(s) listed above from the parent theme (wp-content/themes/twentytwelve/) into your child theme directory.
  3. Open the copied file(s) in a text editor.
  4. Locate the line containing comments_popup_link() or code within the comments-link div.
  5. To remove the link, delete this section of code. To change the text, modify the parameters within the comments_popup_link() function. For example: <?php comments_popup_link( __( 'Add a Reply', 'twentytwelve' ), __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>

Note: Editing theme files requires a basic understanding of PHP and WordPress template structure. Always test changes on a development site first.

Conclusion

Whether you want to hide, move, or change the "Leave a Reply" text in the Twenty Twelve theme, the solutions range from simple CSS adjustments to more advanced PHP edits in a child theme. The CSS method is recommended for most users due to its simplicity and safety. For more profound structural changes, using a child theme is essential to maintain the integrity of your site during future updates.