Support » Plugins » Trying to replace comment template

  • Hey

    I’m writing a custom comment system plugin that will allow user authentication through several Oauth providers. I’t current prototype which is embedded to my theme works perfectly. I’m now trying to move it to a separate plugin, but I can’t get comments_template() replaced.

    function k_comments_template($comment_template) {
    	return "I't works!";
    add_filter('comments_template', 'k_comments_template');

    Any ideas?

Viewing 1 replies (of 1 total)
  • Michael


    Forum Moderator

    try and check the original code:

    /wp-includes/comment-template.php from line 822:

    * The $file path is passed through a filter hook called, 'comments_template'
     * which includes the TEMPLATEPATH and $file combined.

    $include = apply_filters('comments_template', STYLESHEETPATH . $file );
Viewing 1 replies (of 1 total)
  • The topic ‘Trying to replace comment template’ is closed to new replies.