I dont know what is these mean so can you explain to fix it:

class="home page-template-default page page-id-50 logged-in theme-html5blank-stable woocommerce-no-js ehf-header ehf-footer ehf-template-html5blank-stable ehf-stylesheet-html5blank-stable elementor-default elementor-kit-1715 elementor-page elementor-page-50"

here is my website link:


Thank you

  • 2
    That's a class WordPress adds to the <body> tag if you're logged-in to the site. And check your header.php or check the <body> tag there. It could also be a filter/function that causing the classes to be put outside the tag.
    – Sally CJ
    Mar 12 '20 at 23:27
  • 1
    @SallyCJ Thanks I solved and editted question with solution
    – ahmet kaya
    Mar 12 '20 at 23:34
  • Ok, but it's a better option to roll back your edit and instead, write an answer - and accept it (later). That would add the "green" indicator/button to your question in search results and will let people know the question has an accepted solution. Alternatively, set the question title to [SOLVED] <title>.
    – Sally CJ
    Mar 12 '20 at 23:53
  • Ok I did so I will wait two days to be correct my answer
    – ahmet kaya
    Mar 13 '20 at 0:17
  • Great and I hope you don't mind I edited the answer... :)
    – Sally CJ
    Mar 13 '20 at 0:33

It's Used to All class add to wordpress body element Using body_class(); function.

Specifically, it's used to adding body classes, removing body classes, conditionally adding body classes and some use cases.

The Body Class: What Can It Be Used For?

The body class in WordPress is a class or series of classes that are applied to the HTML body element. This is useful for applying unique styles to different areas of a WordPress site as body classes can be added conditionally.

  • This is a really simple way to add body classes and is especially useful if you are creating a theme, using this below code is header.php body element

< body <?php body_class(); ?> >

Adding Multiple Body Classes

There may be times when you want to add more than one body class. This can be achieved using a simple

< body <?php body_class( array( "class-one", "class-two", "class-three" ) ); ?>>

Conditionally Adding a Body Class

This example uses the WooCommerce conditional method of is_shop() :

<?php if ( is_shop() ) { body_class( 'is-woocommerce-shop' ); } else { body_class(); } ?>

Adding a Body Class by Filter

It's possible to use a WordPress filter to add a body class, This code can either go in your themes functions.php or within your plugin.

add_filter( 'body_class','my_body_classes' );
function my_body_classes( $classes ) {

    $classes[] = 'your-custom-class-name';

    return $classes;


refer Link For More Knowledge


Those are the classes echoed by body_class() and the problem was, I called the function outside of the <body> tag:

    <?php body_class(); ?>

So I changed that to:

<body <?php body_class(); ?>>

And that solved the problem. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.