• Resolved Sheila

    (@she97)


    Hello. Would you mind explaining how I could add a specific link to “leave a comment” in the area below the full post displayed on the home page (next to where it currently displays, for example, “posted 1 week ago”)?

    I have a basic child theme already set up, and have no problem editing that with a bit of direction.

    (I don’t think I can exactly leave a link — or can I? — as I am currently editing the new self-hosted site directly through the host. The domain in question is still pointed to WP.com at the moment.)

    Thank you so much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Ask your your host if they provide a temporary URL where you can view the site on the web – many hosts do. I’d like to have a look as I’m not sure how your front page is set up.

    If your site is set to display a static front page, there should already be a comment box, as long as comments are open on that page.

    If I can have a look at your homepage – or if you could even provide a screenshot – that would be helpful.

    Here’s a guide on how to make a screenshot, if you’re not sure: https://en.support.wordpress.com/make-a-screenshot/

    You can upload the screenshot – in a graphic format like JPG, PNG, or PDF – in your Media Library, and provide a link so I can see it, or upload it with a service like Imgur or Snaggy.

    Thread Starter Sheila

    (@she97)

    Thank you for your response, Kathryn. I have the home page set up to display recent posts. Here are two screenshots: one of the home page as it appears when first loaded, the other scrolled down a bit to see the area in question.

    60minutechallenge Home (top)

    Home (scrolled)

    Moderator Kathryn Presner

    (@zoonini)

    Thanks for the screenshots, very helpful!

    What you’ll need to do is place a copy of content.php in your child theme.

    Next, add this comment code below line 30, just above your closing </footer> tag.

    <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
      <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'bushwick' ), __( '1 Comment', 'bushwick' ), __( '% Comments', 'bushwick' ) ); ?></span>
    <?php endif; ?>

    It’ll look something like this:

    Bushwick Child 4 1 0 0 by Anonymous tagline 6

    If you want to style it differently, you can add some CSS in your child theme on the class comments-link

    Let me know how it goes!

    Thread Starter Sheila

    (@she97)

    Perfect! Thank you so, so much!

    Moderator Kathryn Presner

    (@zoonini)

    You’re very welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Comment link below full post on home page’ is closed to new replies.