• Resolved timski72

    (@timski72)


    Hi there,

    I’ve got my blog setup so my front page displays my recent posts. There is no option to leave a comment against a post from here though. You have to click on the post so it appears on its own page before you can leave a comment. Is there a way to enable comments on the front page?

    My site is here:
    https://www.twinphonics.com

    Thanks
    Tim.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Vetraz

    (@vetraz)

    By default, this feature is discouraged by WordPress, however you can still achieve it by modifying the theme’s home.php file which is located by going to Appearance > Editor.

    In the file, simply add the following line:

    <?php global $withcomments; $withcomments = 1; comments_template(); ?>

    right after this snippet:

    <p class="after_meta"><i class="el-icon-folder-open"></i> <?php
            the_category(' &bull; ');
    ?> <?php
            echo get_the_tag_list(' &nbsp &nbsp <i class="el-icon-tags"></i> ', ', ');
    ?> </p>
    
    			    </div>

    Also, if you plan to make this change permanent, consider creating a Child Theme.

    Thread Starter timski72

    (@timski72)

    Thanks Vetraz for taking the time to answer my query. Out of interest, do you know why WordPress discourage it? I’m new to blogging and wordpress so if there is good reason I am happy to avoid doing it.

    I don’t get any traffic yet but I would image people would land on the home page. I wonder how many would then click on the link in the recent posts to be able to leave a comment? That is the reason I would like people to be able to leave comments on the home page too.

    Thanks,
    Tim.

    Thread Starter timski72

    (@timski72)

    Just read the link for Child Theme. That makes sense. Thanks for that. I’ll mark this as closed as you’ve given me the answer. I would still be interested to hear what you think about allowing comments on the home page.

    Thanks,
    Tim.

    Theme Author Vetraz

    (@vetraz)

    I am guessing that the primary reason behind designating commenting feature to single posts/pages only, is to avoid home pages (or archive pages) from becoming overly long and cluttered.

    Another option for front pages is to only display excerpts of posts with “more” links that lead to full posts. This is achieved by utilizing “More” feature in the text editor when creating a post. But of course, this may or may not be applicable or useful in your particular scenario.

    Hope this helps.

    Thread Starter timski72

    (@timski72)

    Thanks again. Great support!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can I allow comments on my front page?’ is closed to new replies.