Support » Plugin: CommentPress Core » need help overriding comment_form

  • Resolved carlsandburg


    i want to modify comment_form so I can integrate Social Login, which would let users log-in via Facebook within the comment window(so they don’t need to enter their email address, name etc. I tried adding the follwing to my child function.php

    // attempt to use a modified version of comment_form

    function my_comment_form_template() {
    echo “value of template directory is ” . get_template_directory();
    return get_template_directory() . ‘/assets/templates/comment_form.php’;
    add_filter(‘cp_template_comment_form’, ‘my_comment_form_template’);

    this doesn’t help – because get_template_directory points to the “regular” comment_form, not my child.

    If i hard code it to force it to my child form, it works fine. But of course, i don’t want to do that if i can help it.

    is there a way to make this better?


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘need help overriding comment_form’ is closed to new replies.