Hi FCJvanderVleuten, you put the code in the wrong place. What you’re seeing on the screen is the output from <?php body_class(); ?>
and should be inside the <body>
tag. Looking at your page source as it is now you actually seem to have two body tags, but neither with any classes.
Right click on your webpage and select ‘View Page Source’ (if the option isn’t there, try clicking on a more ‘blank’ part of the page). You’ll see the opening few tags – DOCTYPE, html, head…body – are repeated again further down.
The class=”home blog logged-in admin-bar no-customize-support” should be inside the (only) body tag. body_class() creates the classes according to your current status, and if your custom background was working it should have added ‘custom-background’ to that list. Here’s some of the code that body_class() uses (indirectly):
if ( is_user_logged_in() )
$classes[] = 'logged-in';
if ( is_admin_bar_showing() ) {
$classes[] = 'admin-bar';
$classes[] = 'no-customize-support';
}
if ( get_theme_mod( 'background_color' ) || get_background_image() )
$classes[] = 'custom-background';
It’s creating that list of classes, but in your case, it seems get_theme_mod( ‘background_color’ ) is false, so it’s not adding custom-background. I don’t know why.
I think maybe you need to take a step back and get a better grasp of which php is creating your webpage, and how.