CommentPress Core
[resolved] need help overriding comment_form (3 posts)

  1. carlsandburg
    Posted 2 years ago #

    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?




  2. Christian Wach
    Plugin Author

    Posted 2 years ago #

    Use get_stylesheet_directory() instead if get_template_directory().

    Cheers, Christian

  3. carlsandburg
    Posted 2 years ago #

    thanks for the input!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CommentPress Core
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.