Support » Installing WordPress » functions error in admin

  • Resolved oldbag66


    actually 2.8.5.

    Ok ive set up WP locally using MAMP, all works fine, uploaded to server, all works fine except when in admin in either PAGES / POSTS the comments column is throwing up the following error:

    Fatal error: Only variables can be passed by reference in /home/sites/ on line 41

    The function file in my template says this:

    add_filter('get_comments_number', 'comment_count', 0);
    function comment_count( $count ) {
    	global $id;
    	$comments_by_type = &separate_comments(get_comments('post_id=' . $id));
    	return count($comments_by_type['comment']);

    line 41 is this:
    $comments_by_type = &separate_comments(get_comments('post_id=' . $id));

    Its a bit beyond me this error, any help would be appreciated.


Viewing 1 replies (of 1 total)
  • Try this…

    $get_comments= get_comments('post_id=' . $id);
    $comments_by_type = &separate_comments($get_comments);

    … instead of your line 41.

Viewing 1 replies (of 1 total)
  • The topic ‘functions error in admin’ is closed to new replies.