• Michael Hartmann

    (@driven4excellencegmailcom)


    I’m authoring a leadership blog and a friend pointed out that he was unable to leave a comment on any post from the static home page: michaelhartmann.us

    When you click on the first article, one previously submitted/approved comment is viable, but followed by the note: “Comments are closed.”
    http://michaelhartmann.us/2014/07/08/a-newfound-hero-2/

    I obviously did something to this page but have no idea how to turn the comments back on.

    Regarding all previous posts, viewers can only leave comments if they click on the article, not from the home page. I’d like to have viewers have the option to “Click to Leave a Comment” if possible. Any suggestions?

    Please help! :/

    Mike

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello Mike!

    Did you look at this page?

    http://codex.wordpress.org/Comments_in_WordPress

    There are all info about how you can handle comments on your site.

    Let me know if it works.

    Thanks!

    Thread Starter Michael Hartmann

    (@driven4excellencegmailcom)

    This helped!

    Specifically, I couldn’t see the “Discussion” box on any of my posts to check the “Allow Comments” box. Here’s what I learned:

    If you do not see the “Discussion” box on the edit Page, click “Screen Options” in the upper right corner of the browser window. Make sure the box next to “Discussion” is checked. By doing this, I found the “Discussion” box option that I could toggle accordingly.

    Thread Starter Michael Hartmann

    (@driven4excellencegmailcom)

    I would still like to be able to prompt readers to “Leave a Comment” at the end of each post from the home page. Currently, readers have to click on the post and then leave comments from the new page.

    Any suggestions on how to allow the comment prompt to be on the home page?

    Hello again!

    Well, to do that you will need to create a child theme and modify your index.php to insert the link for the comments.

    This article will help you with the child theme:

    http://codex.wordpress.org/Child_Themes

    Hope it helps.

    And a Czr-specific guide to Child Themes

    Rather than rewriting the index.php, another approach would be simply to hook yourself in to the Customizr code, with the following in the functions.php of your child theme:

    // Add a link to go to the post comments from the blog list (excludes post types: quotes, asides, statuses and links)
    add_action('__after_content', 'go_to_post_comments');
    function go_to_post_comments() {
    
    	if ( ( is_home() || is_archive() || is_tag() || ( is_search() && 0 !== $wp_query -> post_count) ) && !in_array(get_post_format(), array( 'quote' , 'aside' , 'status' , 'link' )) ) {
    
    		echo '<a class="goto-comment" href="'. get_permalink() . '#respond">Leave a comment</a>';
    
    	}
    }

    This puts a link to the current post’s comments after each post. When you click on it, you will be taken to the “Leave a comment” heading of the post’s comments.

    You will need to style the link with the .goto-comment class that I put in there. For example with something like this:

    .goto-comment {
        color: #09c;
    }

    in your Custom CSS or child theme’s stylesheet.

    If you’ve never used a functions.php in a child theme before, read How to customize Customizr first. If you’re interested in understanding how the above code works, read WordPress Actions, Filters, and Hooks : A guide for non-developers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP Customizr – Enabling Comments Post’ is closed to new replies.