the_posts_pagination example



if ( ! function_exists( 'twenty_twenty_one_the_posts_navigation' ) ) {
    /** * Print the next and previous posts navigation. * * @since Twenty Twenty-One 1.0 * * @return void */
    function twenty_twenty_one_the_posts_navigation() {
        the_posts_pagination(
            array(
                'before_page_number' => esc_html__( 'Page', 'twentytwentyone' ) . ' ',
                'mid_size'           => 0,
                'prev_text'          => sprintf(
                    '%s <span class="nav-prev-text">%s</span>',
                    is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ),
                    wp_kses(
                        __( 'Newer <span class="nav-short">posts</span>', 'twentytwentyone' ),
                        array(
                            'span' => array(
                                'class' => array(),
                            ),
Home | Imprint | This part of the site doesn't use cookies.