'; } else{ echo '
'; } if ( post_password_required() ){ echo '

'; esc_html_e( 'This post is password protected. Enter the password to view any comments.' , 'gourmand' ); echo '

'; echo '
'; return; } if( apply_filters( 'gourmand_custom_comments', false ) ){ /** * To customize your comments you can use filter * gourmand_custom_comments */ return; } /* IF EXISTS WORDPRESS COMMENTS */ else if ( have_comments() ) { $nr = absint( get_comments_number() ); echo '
'; echo '

'; echo ''; esc_html_e( 'Comments', 'gourmand' ); echo '

'; echo '
    '; wp_list_comments( array( 'callback' => array( 'gourmand_comments' , 'classic' ), 'style' => 'ul' )); echo '
'; echo '
'; $args = array( 'echo' => false, 'prev_text' => sprintf( __( '%1$s Prev' , 'gourmand' ) , '' ), 'next_text' => sprintf( __( 'Next %1$s' , 'gourmand' ) , '' ) ); $pgn = paginate_comments_links( $args ); /* WORDPRESS PAGINATION FOR COMMENTS */ if( !empty( $pgn ) ){ echo ''; } } if ( !have_comments() ) { /** * If not found comments load custom template * ../templates/comments/no-comments.php */ echo '
'; echo '

'; echo ''; esc_html_e( 'There are currently no comments.', 'gourmand' ); echo '

'; //gourmand_get_template_part( 'templates/comments/no-comments' ); } /* FORM SUBMIT COMMENTS */ $commenter = wp_get_current_commenter(); $name = gourmand_esc::text( $commenter[ 'comment_author' ] ) ? gourmand_esc::text( $commenter[ 'comment_author' ] ) : null; $email = gourmand_esc::email( $commenter[ 'comment_author_email' ] ) ? gourmand_esc::email( $commenter[ 'comment_author_email' ] ) : null; $web = gourmand_esc::url( $commenter[ 'comment_author_url' ] ) ? gourmand_esc::url( $commenter[ 'comment_author_url' ] ) : null; /* FIELDS */ $fields = array( 'author' => '
'. '

', 'email' => '', 'url' => '

' ); $text = ''; if ( !have_comments() ) { $text = '

'; $text .= ''; $text .= '

'; } else{ $text = '

'; $text .= ''; $text .= '

'; } $args = array( 'title_reply' => '', 'comment_notes_after' => '', 'comment_notes_before' => '', 'logged_in_as' => '', 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 'comment_field' => $text, 'label_submit' => __( 'Submit Comment' , 'gourmand' ) ); echo '
'; comment_form( $args ); echo '
'; echo '
'; echo '
'; } ?>