guest-class

If you want WordPress to automatically append a class to the body_class list when users are not authenticated, put that class name here.

Usage

KeyTypeRequiredDefault
"guest-class"stringNo"guest"

To remove this functionality altogether, set to "null"

Example

config.php
return [
"guest-class" => "my-custom-class",
]
Setting a custom guest class

Also note that we must call the body_class() (or get_body_class()) function to get these classes wherever our body tag is located in the theme.

header.php
<?php wp_head() ?>
 
<body <?php body_class() ?>>
}}