Ready to get started?Download WordPress


Trying to replace comment template (2 posts)

  1. ipave
    Posted 1 year ago #


    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?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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 );

Topic Closed

This topic has been closed to new replies.

About this Topic