Answer the question
In order to leave comments, you need to log in
How to remove "Notice: Only variables should be assigned by reference in" error in Wordpress?
Good day to all!
After updating Wordpress on the site, errors appeared in the template files:
Notice: Only variables should be passed by reference in /var/site-ru/wp-content/themes/theme1692/functions.php on line 72
Notice: Only variables should be assigned by reference in /var/site-ru/wp- content/themes/theme1692/functions.php on line 72
67) // Removes Trackbacks from the comment cout
68) add_filter('get_comments_number', 'comment_count', 0);
69) function comment_count( $count ) {
70) if ( ! is_admin() ) {
71) global $id;
72) $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
73) return count($comments_by_type['comment']);
74) } else {
75) return $count;
76) }
77) }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question