Last active
January 25, 2017 17:44
-
-
Save carasmo/9b613a74c588a886eb74776981c64bbb to your computer and use it in GitHub Desktop.
Move comment form above comments / discussion in Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//do not add above php tag | |
/** | |
* | |
* add comment form above the discussion (list of comments) | |
* change yourprefix_ to yours | |
*/ | |
function yourprefix_reorder_comment_form_before_discussion() { | |
if ( is_single() && have_comments() ) { | |
remove_action( 'genesis_comment_form', 'genesis_do_comment_form' ); | |
add_action( 'genesis_comments', 'genesis_do_comment_form' , 1 ); | |
} | |
} | |
add_action( 'genesis_before_comments' , 'yourprefix_reorder_comment_form_before_discussion' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment