the_content example

<?php get_template_part( 'template-parts/header/entry-header' ); ?> <?php twenty_twenty_one_post_thumbnail(); ?> </header><!-- .entry-header --> <?php elseif ( has_post_thumbnail() ) : ?> <header class="entry-header alignwide"> <?php twenty_twenty_one_post_thumbnail(); ?> </header><!-- .entry-header --> <?php endif; ?> <div class="entry-content"> <?php         the_content();

        wp_link_pages(
            array(
                'before'   => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
                'after'    => '</nav>',
                /* translators: %: Page number. */
                'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
            )
        );
        ?> </div><!-- .entry-content -->


// Print the 1st instance of a paragraph block. If none is found, print the content. if ( has_block( 'core/paragraph', get_the_content() ) ) {

    twenty_twenty_one_print_first_instance_of_block( 'core/paragraph', get_the_content() );
} else {

    the_content();
}
?> <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>',
                /* translators: %: Page number. */
                'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
            )
        );
        ?> </div><!-- .entry-content --> <footer class="entry-footer default-max-width">

                $image_size = apply_filters( 'twenty_twenty_one_attachment_size', 'full' );
                echo wp_get_attachment_image( get_the_ID()$image_size );
                ?> <?php if ( wp_get_attachment_caption() ) : ?> <figcaption class="wp-caption-text"><?php echo wp_kses_post( wp_get_attachment_caption() ); ?></figcaption> <?php endif; ?> </figure><!-- .wp-block-image --> <?php             the_content();

            wp_link_pages(
                array(
                    'before'   => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
                    'after'    => '</nav>',
                    /* translators: %: Page number. */
                    'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
                )
            );
            ?> </div><!-- .entry-content --> <footer class="entry-footer default-max-width">
/** * Show the appropriate content for the Status post format. * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

// Print the full content. the_content();
/** * Show the appropriate content for the Aside post format. * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */

// Print the full content. the_content();
<?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()
        );

        wp_link_pages(
            array(
                'before'   => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
                'after'    => '</nav>',
                /* translators: %: Page number. */
                'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
            )
        );

        
Home | Imprint | This part of the site doesn't use cookies.