Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EmeraldDragon2021 opened this issue May 26, 2022 · 3 comments

Comments

@EmeraldDragon2021
Copy link

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
Copy link

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
Copy link

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

@manojsiddoji
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants