WordPress / theme-review-action

Other
31 stars 10 forks source link

php file (IE: singular.php, index.php) does not contain a body class #69

Open EmeraldDragon2021 opened 2 years ago

EmeraldDragon2021 commented 2 years ago

I have been getting the following messages when I am submitting my theme, this started happening in the past three months (more or less)

"/?p=1241" (via: singular.php) does not contain a body class "/" (via: index.php) does not contain a body class "/?tag=alignment-2" (via: index.php) does not contain a body class

I know that I have included the body class in my theme, so I know that's not the problem that I did not forget to include the tag. So, I am submitting the issue, just in case.

manojsiddoji commented 2 weeks ago

Debug with var_dump: Add var_dump(body_class()); in your header file to see if the function is returning the expected classes. This can help identify if the issue is with the function itself.

manojsiddoji commented 2 weeks ago

Theme support : Add this statement to your functions.php = add_theme_support('body-class');

manojsiddoji commented 2 weeks ago

From personal experience i can say tht enabling WP_DEBUG in your wp-config.php file to see if any errors might provide some clues.