the title correct placement

Question

I have a code like below for single post comments:

<div id="respond" class="box m-t-6">
    <?php
    global $aria_req;
    $consent       = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
    $comments_args = array(
        'title_reply'          => '<h4><span>' . __( 'Leave a Reply', 'schema' ) . '</span></h4>',
        'comment_notes_before' => '',
        'comment_notes_after'  => '',
        'label_submit'         => __( 'Post Comment', 'schema' ),
        'comment_field'        => '<p class="comment-form-comment"><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="' . __( 'Comment Text*', 'schema' ) . '"></textarea></p>',
        'fields'               => apply_filters( 'comment_form_default_fields',
            array(
                'author' => '<p class="comment-form-author">' . ( $req ? '' : '' ) . '<input id="author" name="author" type="text" placeholder="' . __( 'Name*', 'schema' ) . '" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
                'email'  => '<p class="comment-form-email">' . ( $req ? '' : '' ) . '<input id="email" name="email" type="text" placeholder="' . __( 'Email*', 'schema' ) . '" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
                'url'    => '<p class="comment-form-url"><input id="url" name="url" type="text" placeholder="' . __( 'Website', 'schema' ) . '" value="' . esc_url( $commenter['comment_author_url'] ) . '" size="30" /></p>',
            )
        ),
    );
    comment_form( $comments_args );
    ?>
</div>

I want to add the title of the post just after Leave a Reply in h4 tag so that it’ll read Leave a reply on title.

I tried adding echo the_title(); and $(the_title();) there but it is throwing error.

Can someone please let me know what I am missing?

Thank you.

0
Jituu 4 months 0 Answers 13 views 0

Leave an answer