Tworzenie nagłówka w wordpress wraz z wstępnymi danymi

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
    <head>
        <title><?php bloginfo( 'name' ); wp_title(); ?></title>
        <meta name="description" content="<?php bloginfo( 'description' ); ?>">
        <meta charset="<?php bloginfo( 'charset' ); ?>">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="profile" href="http://gmpg.org/xfn/11">
        <?php if( is_singular() && pings_open( get_queried_object() ) ): ?>
            <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
        <?php endif; ?>
        <?php wp_head(); ?>
        
        <?php /*
            $custom_css = esc_attr( get_option( 'sunset_css' ) );
            if( !empty( $custom_css ) ):
                echo '<style>' . $custom_css . '</style>';
            endif; */
        ?>
    </head>
<body <?php body_class(); ?>>

Za pomocą metody bloginfo() możemy wypisać wiele interesujących informacji. Więcej o bloginfo() tutaj: https://developer.wordpress.org/reference/functions/bloginfo/

Scroll to Top