Forums

Error when trying to customize wp_list_comments (2 posts)

  1. ranji77
    Member
    Posted 2 years ago #

    I'm trying to style my comments using the exact snippets from here: http://codex.wordpress.org/Template_Tags/wp_list_comments

    Using
    <?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>
    in my comments.php

    But for some reason, anywhere my comments get shown it reads:

    Warning: call_user_func(custom_comments) [function.call-user-func]: First argument is expected to be a valid callback in /home/user/public_html/wp-includes/comment-template.php on line 1242

    I've never touched or edited the comment-template.php file so I'm not sure why I'm getting this message. I'm on the latest version 2.9 and on a fresh install.

    Any help is appreciated!

  2. Mark / t31os
    Moderator
    Posted 2 years ago #

    First argument is expected to be a valid callback
    Means the function you've referenced in the callback doesn't exist..

    <?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>

    See the link again, the example is quite clear..

Topic Closed

This topic has been closed to new replies.

About this Topic