I am making a theme where I have built in my own custom threading and such using twitter bootstrap. I have it now so that, as per default, when you click reply you are shot down to the WordPress comment forum.

Is there a way to make the comment forum come to you? to display right under the comment you are replying too?


Enqueue the 'comment-reply' script.

function wpse88530_enqueue_comment_reply() {
// Enqueue the comment-reply script on 
//single blog post pages with comments 
// open and threaded comments
if ( 
    // Returns the value for the specified option.
    // 'thread_comments' is a Boolean option where
    // comments are threaded if TRUE, and flat if 
    // FALSE
    get_option( 'thread_comments' ) 
) { 
    // enqueue the javascript that performs 
    //in-link comment reply fanciness
    wp_enqueue_script( 'comment-reply' ); 
// Hook into comment_form_before
add_action( 'comment_form_before', 'wpse88530_enqueue_comment_reply' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.