Undefined variable comments (PHP error)

Hi,

I found 30 PHP errors in my X-Child Theme. I think they all belong to the same problem: Undefined variable: comments

I added you a screenshot of the error messages. And also I have checked (for example) my _content-post-header.php - but I can´t found the problem there. Has it something to do with x_ethos_entry_meta?

Can you please help me to find the problem and to fix these errors? I develop on localhost at the moment. If you need more information (for example my functions.php) please let me know.

Michael

Hello Michael,

Thanks for writing in! Undefined variable means that the variable does not exist or not yet initialized (set to null). All of those variables is coming from the “x_ethos_entry_meta()” function Did you added a custom x_ethos_entry_meta() function in your child theme’s functions.php file? Anyways, you do not have to worry about this notices as this does not affect your site’s performance.

Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.