the_title example

<?php /** * Displays the post header * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

the_title( '<h1 class="entry-title">', '</h1>' );
if ( $thumbnail_id && 'rectangular' === $shape ) :
            ?> <div class="wp-embed-featured-image rectangular"> <a href="<?php the_permalink(); ?>" target="_top"> <?php echo wp_get_attachment_image( $thumbnail_id$image_size ); ?> </a> </div> <?php endif; ?> <p class="wp-embed-heading"> <a href="<?php the_permalink(); ?>" target="_top"> <?php the_title(); ?> </a> </p> <?php if ( $thumbnail_id && 'square' === $shape ) : ?> <div class="wp-embed-featured-image square"> <a href="<?php the_permalink(); ?>" target="_top"> <?php echo wp_get_attachment_image( $thumbnail_id$image_size ); ?> </a> </div> <?php endif; ?> <div class="wp-embed-excerpt">


// Don't show the title if the post-format is `aside` or `status`. $post_format = get_post_format();
if ( 'aside' === $post_format || 'status' === $post_format ) {
    return;
}
?> <header class="entry-header"> <?php     the_title( sprintf( '<h2 class="entry-title default-max-width"><a href="%s">', esc_url( get_permalink() ) ), '</a></h2>' );
    twenty_twenty_one_post_thumbnail();
    ?> </header><!-- .entry-header -->


/** * Creates continue reading text. * * @since Twenty Twenty-One 1.0 */
function twenty_twenty_one_continue_reading_text() {
    $continue_reading = sprintf(
        /* translators: %s: Post title. Only visible to screen readers. */
        esc_html__( 'Continue reading %s', 'twentytwentyone' ),
        the_title( '<span class="screen-reader-text">', '</span>', false )
    );

    return $continue_reading;
}

/** * Creates the continue reading link for excerpt. * * @since Twenty Twenty-One 1.0 */
function twenty_twenty_one_continue_reading_link_excerpt() {
    


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"> <?php                 /** * Filter the default image attachment size. * * @since Twenty Twenty-One 1.0 * * @param string $image_size Image size. Default 'full'. */


?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( is_singular() ) : ?> <?php the_title( '<h1 class="entry-title default-max-width">', '</h1>' ); ?> <?php else : ?> <?php the_title( sprintf( '<h2 class="entry-title default-max-width"><a href="%s">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> <?php endif; ?> <?php twenty_twenty_one_post_thumbnail(); ?> </header><!-- .entry-header --> <div class="entry-content"> <?php         the_content(
            twenty_twenty_one_continue_reading_text()
        );


?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header alignwide"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <?php twenty_twenty_one_post_thumbnail(); ?> </header><!-- .entry-header --> <div class="entry-content"> <?php         the_content();

        wp_link_pages(
            array(
                'before'   => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
                'after'    => '</nav>',
                
Home | Imprint | This part of the site doesn't use cookies.