Forums

Remove "leave a comment" (14 posts)

  1. v2006
    Member
    Posted 1 year ago #

    How to I remove "leave a comment"

    I don't want any references to comments displayed on any pages.

    So far I removed the comments template code from index.php in the template

    Please advise

  2. wp_guy
    Member
    Posted 1 year ago #

    If you do not want to use the commenting feature at all... you can remove the code "<?php comments_template(); ?>" from the single.php file of your theme.

  3. haochi
    Member
    Posted 1 year ago #

    Also disable comments on the Discussion page under Settings, simply removing the code isn't 100% fool-proof.

  4. v2006
    Member
    Posted 1 year ago #

    Thanks wp_guy but I don't have a single.php file in my template

    I have..

    archives
    comments
    footer
    functions
    header
    home
    index
    l_sidebar
    r_sidebar
    page
    search
    style
    404
    images folder

    What other file do I need to edit?

    haochi - disabling comments in the admin panel is what I did first.

  5. wp_guy
    Member
    Posted 1 year ago #

    If you don't have a single.php... then index.php is used instead... do you see a "<?php comments_template(); ?>" in your index.php file?

  6. v2006
    Member
    Posted 1 year ago #

    Thanks...I mentioned that I had already done this in my original post.
    The template is gone but I still have "leave a comment" at the bottom of my posts.
    See here: selfhelpguide.net

    How do I get rid of this link?

  7. wp_guy
    Member
    Posted 1 year ago #

    Is it just the "leave a comment" text? no comments form?

  8. whooami
    Member
    Posted 1 year ago #

    Look for this in index.php,

    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

    or something VERY similar. Thats what you are looking to delete.

    If you cant locate it, provide a link to where your current theme can be downloaded. Please not a "here is an almost link", but the actual page.

  9. v2006
    Member
    Posted 1 year ago #

    Yes, it's just the "leave a comment" text
    The comments template has been deleted.

    whooami...I couldn't locate it in index.php

    Actual page....
    selfhelpguide.net

    Download link for template
    http://www.briangardner.com/themes/downtown-java-wordpress-theme.htm

    Thank you

  10. wp_guy
    Member
    Posted 1 year ago #

    Actually the code that whooami mentioned is found in archive.php for that theme.

  11. v2006
    Member
    Posted 1 year ago #

    Thanks
    I removed it from this code in archives.php but "leave a comment" still remains on in the post on the home page.

    <div class="postmeta">
    <p><?php the_time('F j, Y'); ?> | Filed Under <?php the_category(', ') ?> |  <?php edit_post_link('(Edit)', '', ''); ?></p>
    </div>

    Please advise

  12. wp_guy
    Member
    Posted 1 year ago #

    Maybe it's home.php ...

  13. whooami
    Member
    Posted 1 year ago #

    home.php

    <div class="postmeta">
    			<?php the_time('F j, Y'); ?> | Filed Under <?php the_category(', ') ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>&nbsp;<?php edit_post_link('(Edit)', '', ''); ?>
    
    		</div>

    I told you what to look for, you have to take a little initiative and look through the other files... :<

  14. v2006
    Member
    Posted 1 year ago #

    Worked!

    Thanks very much for your patience.

    I wish you well.

Topic Closed

This topic has been closed to new replies.

About this Topic