wp_link_pages example

<?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' ),
            )
        );

        ?> </div><!-- .entry-content --> <footer class="entry-footer default-max-width">
<?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">
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">
</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 --> <?php if ( get_edit_post_link() ) : ?>

function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
                    $pagelink='%', $more_file='') {
    _deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );

    $args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
    return wp_link_pages($args);
}

/** * Get value based on option. * * @since 0.71 * @deprecated 2.1.0 Use get_option() * @see get_option() * * @param string $option * @return string */
    // that might rely on the `in_the_loop` check; calling `the_post` sets it to true.     if ( ! in_the_loop() && have_posts() ) {
        the_post();
    }

    // When inside the main loop, we want to use queried object     // so that `the_preview` for the current post can apply.     // We force this behavior by omitting the third argument (post ID) from the `get_the_content`.     $content = get_the_content();
    // Check for nextpage to display page links for paginated posts.     if ( has_block( 'core/nextpage' ) ) {
        $content .= wp_link_pages( array( 'echo' => 0 ) );
    }

    /** This filter is documented in wp-includes/post-template.php */
    $content = apply_filters( 'the_content', str_replace( ']]>', ']]&gt;', $content ) );
    unset( $seen_ids[ $post_id ] );

    if ( empty( $content ) ) {
        return '';
    }

    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'entry-content' ) );

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