devinsays / portfolio-press

A WordPress theme for artists and designers to showcase their work.
https://wptheming.com/portfolio-theme/
GNU General Public License v2.0
62 stars 30 forks source link

Enqueue comment-reply script #58

Closed mfields closed 10 years ago

mfields commented 10 years ago

header.php line 16:

<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>

The comment-reply script should be enqueued in functions.php. Something like this works rather well during the wp_enqueue_scripts action:

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    wp_enqueue_script( 'comment-reply' );
}

This code will also ensure that comments are open.

devinsays commented 10 years ago

Thanks. Update pushed. Leaving this ticket open though because I want to follow up and style the reply button better. I didn't have threaded comments activated in my dev sandbox for some reason.