get_header example

<?php /** * The template for displaying 404 pages (not found) * * @link https://codex.wordpress.org/Creating_an_Error_404_Page * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

get_header();
?> <header class="page-header alignwide"> <h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1> </header><!-- .page-header --> <div class="error-404 not-found default-max-width"> <div class="page-content"> <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p> <?php get_search_form(); ?> </div><!-- .page-content --> </div><!-- .error-404 -->
/** * Retrieves the Content-Type of the request. * * @since 4.4.0 * * @return array|null Map containing 'value' and 'parameters' keys * or null when no valid Content-Type header was * available. */
    public function get_content_type() {
        $value = $this->get_header( 'Content-Type' );
        if ( empty( $value ) ) {
            return null;
        }

        $parameters = '';
        if ( strpos( $value, ';' ) ) {
            list( $value$parameters ) = explode( ';', $value, 2 );
        }

        $value = strtolower( $value );
        if ( ! str_contains( $value, '/' ) ) {
            
/** * Contains the post embed base template * * When a post is embedded in an iframe, this file is used to create the output * if the active theme does not include an embed.php template. * * @package WordPress * @subpackage oEmbed * @since 4.4.0 */

get_header( 'embed' );

if ( have_posts() ) :
    while ( have_posts() ) :
        the_post();
        get_template_part( 'embed', 'content' );
    endwhile;
else :
    get_template_part( 'embed', '404' );
endif;

get_footer( 'embed' );
<?php }
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );

get_header( 'wp-activate' );

$blog_details = get_site();
?> <div id="signup-content" class="widecolumn"> <div class="wp-activate-container"> <?php if ( ! $key ) { ?> <h2><?php _e( 'Activation Key Required' ); ?></h2> <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url( $blog_details->path . 'wp-activate.php' ); ?>"> <p> <label for="key">
<?php /** * The template for displaying all single posts * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

get_header();

/* Start the Loop */
while ( have_posts() ) :
    the_post();

    get_template_part( 'template-parts/content/content-single' );

    if ( is_attachment() ) {
        // Parent post navigation.         the_post_navigation(
            array(
                
<?php /** * The template for displaying all single posts * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

get_header();

/* Start the Loop */
while ( have_posts() ) :
    the_post();
    get_template_part( 'template-parts/content/content-page' );

    // If comments are open or there is at least one comment, load up the comment template.     if ( comments_open() || get_comments_number() ) {
        comments_template();
    }
endwhile; // End of the loop.
if ( isset( $request['author_ip'] ) && current_user_can( 'moderate_comments' ) ) {
            $prepared_comment['comment_author_IP'] = $request['author_ip'];
        } elseif ( ! empty( $_SERVER['REMOTE_ADDR'] ) && rest_is_ip_address( $_SERVER['REMOTE_ADDR'] ) ) {
            $prepared_comment['comment_author_IP'] = $_SERVER['REMOTE_ADDR'];
        } else {
            $prepared_comment['comment_author_IP'] = '127.0.0.1';
        }

        if ( ! empty( $request['author_user_agent'] ) ) {
            $prepared_comment['comment_agent'] = $request['author_user_agent'];
        } elseif ( $request->get_header( 'user_agent' ) ) {
            $prepared_comment['comment_agent'] = $request->get_header( 'user_agent' );
        }

        if ( ! empty( $request['date'] ) ) {
            $date_data = rest_get_date_with_gmt( $request['date'] );

            if ( ! empty( $date_data ) ) {
                list( $prepared_comment['comment_date']$prepared_comment['comment_date_gmt'] ) = $date_data;
            }
        } elseif ( ! empty( $request['date_gmt'] ) ) {
            $date_data = rest_get_date_with_gmt( $request['date_gmt'], true );

            
<?php /** * The template for displaying archive pages * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

get_header();

$description = get_the_archive_description();
?> <?php if ( have_posts() ) : ?> <header class="page-header alignwide"> <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?> <?php if ( $description ) : ?> <div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div> <?php endif; ?>
<?php /** * The template for displaying image attachments * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

get_header();

// Start the loop. while ( have_posts() ) {
    the_post();
    ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header alignwide"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> <div class="entry-content"> <figure class="wp-block-image">
/** * The gettext implementation of select_plural_form. * * It lives in this class, because there are more than one descendand, which will use it and * they can't share it effectively. * * @param int $count */
        public function gettext_select_plural_form( $count ) {
            if ( ! isset( $this->_gettext_select_plural_form ) || is_null( $this->_gettext_select_plural_form ) ) {
                list( $nplurals$expression )     = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
                $this->_nplurals                   = $nplurals;
                $this->_gettext_select_plural_form = $this->make_plural_form_function( $nplurals$expression );
            }
            return call_user_func( $this->_gettext_select_plural_form, $count );
        }

        /** * @param string $header * @return array */
        public function nplurals_and_expression_from_header( $header ) {
            


get_header(); ?> <?php if ( is_home() && ! is_front_page() && ! empty( single_post_title( '', false ) ) ) : ?> <header class="page-header alignwide"> <h1 class="page-title"><?php single_post_title(); ?></h1> </header><!-- .page-header --> <?php endif; ?> <?php if ( have_posts() ) {

    // Load posts loop.
<?php /** * The template for displaying search results pages * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

get_header();

if ( have_posts() ) {
    ?> <header class="page-header alignwide"> <h1 class="page-title"> <?php             printf(
                /* translators: %s: Search term. */
                esc_html__( 'Results for "%s"', 'twentytwentyone' ),
                '<span class="page-description search-term">' . esc_html( get_search_query() ) . '</span>'
            );
            
<?php }
add_action( 'wp_head', 'wpmu_signup_stylesheet' );

get_header( 'wp-signup' );

/** * Fires before the site Sign-up form. * * @since 3.0.0 */
do_action( 'before_signup_form' );
?> <div id="signup-content" class="widecolumn"> <div class="mu_register wp-signup-container" role="main"> <?php
Home | Imprint | This part of the site doesn't use cookies.