How to change placement of Comments header?

Community Forums Forums Design Tips and Tricks How to change placement of Comments header?

This topic is: not resolved

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  braddalton 8 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #53955

    ariherzogdotcom
    Participant
    Post count: 11

    In the below functions I am 1) inserting a comment policy box and 2) adding the comment form before the comments.

    add_action( 'genesis_before_comments', 'single_post_comment_policy' );
    function single_post_comment_policy() {
        if ( is_single() && !is_user_logged_in() && comments_open() ) {
        ?>
        <div class="comment-policy-box">
            <p class="comment-policy">Your words are your own, so be nice and helpful if you can. Please use your real name. For the fine print, <a href="http://ariherzog.com/comment-policy/">here is the comment policy</a>.</p><br />
    	<p>Complete the form below to comment on WordPress. Click the above tabs to comment on Facebook or Google.</p>
        </div>
        <?php
        }
    }
    
    add_action( 'genesis_before_comments' , 'wps_post_type_check' );
    function wps_post_type_check () {
    	if ( is_single() ) {
    		if ( have_comments() ) {
    			remove_action( 'genesis_comment_form', 'genesis_do_comment_form' );
    			add_action( 'genesis_list_comments', 'genesis_do_comment_form' , 5 );
    		}
    	}
    }

    Both are fine — but how can the “Comments” header occur after the form and before the comments themselves? Scroll to any post at http://ariherzog.com to see what I mean. Thanks.


    I explore new and emerging media at ariherzog.com. I’m also new to Genesis in April 2013.

    http://ariherzog.com
    #54031

    braddalton
    Participant
    Post count: 7472

    Change the hook and try adding a 3rd parameter for positioning priority.

    You can also change the hook for the comment form and header to make it work.

    Here’s all the comment action hooks http://my.studiopress.com/docs/hook-reference/#comment-action-hooks


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.