Skip to content

Instantly share code, notes, and snippets.

@carasmo
Last active January 25, 2017 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carasmo/9b613a74c588a886eb74776981c64bbb to your computer and use it in GitHub Desktop.
Save carasmo/9b613a74c588a886eb74776981c64bbb to your computer and use it in GitHub Desktop.
Move comment form above comments / discussion in Genesis
<?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