body_class example


$template_html = get_the_block_template_html();
?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <?php wp_body_open(); ?> <?php echo $template_html; // phpcs:ignore WordPress.Security.EscapeOutput ?> <?php wp_footer(); ?> </body> </html>
<?php echo wp_get_document_title(); ?></title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <?php     /** * Prints scripts or data in the embed template head tag. * * @since 4.4.0 */
    do_action( 'embed_head' );
    ?> </head> <body <?php body_class(); ?>>


?> <!doctype html> <html <?php language_attributes(); ?> <?php twentytwentyone_the_html_classes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <?php wp_body_open(); ?> <div id="page" class="site"> <a class="skip-link screen-reader-text" href="#content"> <?php         /* translators: Hidden accessibility text. */
        esc_html_e( 'Skip to content', 'twentytwentyone' );
        ?> </a> <?php get_template_part( 'template-parts/header/site-header' ); ?> <div id="content" class="site-content"> <div id="primary" class="content-area"> <main id="main" class="site-main">
<?php } ?> <?php if ( is_singular() ) {
    wp_enqueue_script( 'comment-reply' );
}
?> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="page"> <div id="header" role="banner"> <div id="headerimg"> <h1><a href="<?php echo home_url(); ?>/"><?php bloginfo( 'name' ); ?></a></h1> <div class="description"><?php bloginfo( 'description' ); ?></div> </div> </div> <hr />
<?php wp_head(); ?> <style> /* Reset theme styles */ html, body, #page, #content { padding: 0 !important; margin: 0 !important; } </style> </head> <body <?php body_class(); ?>> <div id="page" class="site"> <div id="content" class="site-content"> <?php                 $registry = WP_Block_Type_Registry::get_instance();
                $block    = $registry->get_registered( 'core/legacy-widget' );
                echo $block->render(
                    array(
                        'idBase'   => $id_base,
                        'instance' => $instance,
                    )
                );
                
<?php body_class(); ?>> <div id="page" class="site"> <div id="content" class="site-content"> <?php                 $registry = WP_Block_Type_Registry::get_instance();
                $block    = $registry->get_registered( 'core/legacy-widget' );
                echo $block->render( $_GET['legacy-widget-preview'] );
                ?> </div><!-- #content --> </div><!-- #page --> <?php wp_footer(); ?> </body> </html>
Home | Imprint | This part of the site doesn't use cookies.