WordPress.org

Support

Support » Themes and Templates » error when replacing twentyeleven theme comment.php to another theme

error when replacing twentyeleven theme comment.php to another theme

  • i want to customize my theme comment

    i tried to replace comments.php (twentyeleven theme) to my theme’s comments.php file

    i got an error

    Warning: call_user_func(twentyeleven_comment) [function.call-user-func]: First argument is expected to be a valid callback in
    E:\------------\wwwroot\wp-includes\comment-template.php on line 1334

    please help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    you also need to copy the comment callback function into functions.php of your theme;

    copy it from functions.php of twenty eleven (line 485 to 572):

    if ( ! function_exists( 'twentyeleven_comment' ) ) :
    /**
     * Template for comments and pingbacks.
     *
    ...
    etc.
    ...
    		esc_html( get_the_author() )
    	);
    }
    endif;

    thanks friend !

    you mean to paste these code into function.php

    https://gist.github.com/1113826

    Moderator Michael

    @alchymyth

    Forum Moderator

    yes – that is the right code.

    how can i merge this code into comments.php could it possible ?

    i am not so smart in php so if you can tell me, if possible

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘error when replacing twentyeleven theme comment.php to another theme’ is closed to new replies.