0

I am looking for a way to embed WordPress comment form to watch.php in order to allow user to comment on a specific video. Can you tell me how?

Eaxample

2
  • 5
    What kind of problems do you have? Did you try to include <?php comments_template(); ?> at all in that template? See the Codex for more info. A little research is appreciated before even asking some! Btw are you misusing wordpress.com or is that a mistaken tag?
    – Charles
    Commented Feb 27, 2016 at 4:45
  • Comments can be done on some object. Video should be post-type or attachment.
    – Sumit
    Commented Feb 27, 2016 at 7:54

2 Answers 2

1

Take a look at rendering a comment_form. You can render it anywhere in your page template and there are lots of ways to customize it.

$comments_args = array (
    // change the title of send button
    'label_submit'        => 'Send',
    // change the title of the reply section
    'title_reply'         => 'Leave Your Comment',
    // remove "Text or HTML to be displayed after the set of comment fields"
    'comment_notes_after' => '',
    // redefine your own textarea (the comment body)
    'comment_field'       => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><br /><textarea id="comment" name="comment" aria-required="true"></textarea></p>',
);

comment_form( $comments_args );
0

If the video is embedded in a normal post, you just switch on the option leave comments below your posts when editing or writing a post. You don't see that ? On the right of your edit post on top of the page, you can click on show/hide options. Check Comments.

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