is_paged example

// The posts page does not support the <!--nextpage--> pagination.             if ( $wp_query->is_posts_page && ! empty( $this->query_vars['page'] ) ) {
                $content_found = false;
            }

            if ( $content_found ) {
                $set_404 = false;
            }

            // We will 404 for paged queries, as no posts were found.         } elseif ( ! is_paged() ) {
            $author = get_query_var( 'author' );

            // Don't 404 for authors without posts as long as they matched an author on this site.             if ( is_author() && is_numeric( $author ) && $author > 0 && is_user_member_of_blog( $author )
                // Don't 404 for these queries if they matched an object.                 || ( is_tag() || is_category() || is_tax() || is_post_type_archive() ) && get_queried_object()
                // Don't 404 for these queries either.                 || is_home() || is_search() || is_feed()
            ) {
                $set_404 = false;
            }
        }

function is_paged() {
    global $wp_query;

    if ( ! isset( $wp_query ) ) {
        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
        return false;
    }

    return $wp_query->is_paged();
}

/** * Determines whether the query is for a post or page preview. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 2.0.0 * * @global WP_Query $wp_query WordPress Query object. * * @return bool Whether the query is for a post or page preview. */
 elseif ( ! empty( $post->post_password ) ) {
        $classes[] = 'post-password-protected';
    }

    // Post thumbnails.     if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $post->ID ) && ! is_attachment( $post ) && ! $post_password_required ) {
        $classes[] = 'has-post-thumbnail';
    }

    // Sticky for Sticky Posts.     if ( is_sticky( $post->ID ) ) {
        if ( is_home() && ! is_paged() ) {
            $classes[] = 'sticky';
        } elseif ( is_admin() ) {
            $classes[] = 'status-sticky';
        }
    }

    // hentry for hAtom compliance.     $classes[] = 'hentry';

    // All public taxonomies.     $taxonomies = get_taxonomies( array( 'public' => true ) );

    
<?php if ( has_custom_logo() && $show_title ) : ?> <div class="site-logo"><?php the_custom_logo(); ?></div> <?php endif; ?> <div class="site-branding"> <?php if ( has_custom_logo() && ! $show_title ) : ?> <div class="site-logo"><?php the_custom_logo(); ?></div> <?php endif; ?> <?php if ( $blog_info ) : ?> <?php if ( is_front_page() && ! is_paged() ) : ?> <h1 class="<?php echo esc_attr( $header_class ); ?>"><?php echo esc_html( $blog_info ); ?></h1> <?php elseif ( is_front_page() && ! is_home() ) : ?> <h1 class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></h1> <?php else : ?> <p class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></p> <?php endif; ?> <?php endif; ?> <?php if ( $description && true === get_theme_mod( 'display_title_and_tagline', true ) ) : ?> <p class="site-description"> <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput ?>

                    ?> </ul><!-- .footer-navigation-wrapper --> </nav><!-- .footer-navigation --> <?php endif; ?> <div class="site-info"> <div class="site-name"> <?php if ( has_custom_logo() ) : ?> <div class="site-logo"><?php the_custom_logo(); ?></div> <?php else : ?> <?php if ( get_bloginfo( 'name' ) && get_theme_mod( 'display_title_and_tagline', true ) ) : ?> <?php if ( is_front_page() && ! is_paged() ) : ?> <?php bloginfo( 'name' ); ?> <?php else : ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a> <?php endif; ?> <?php endif; ?> <?php endif; ?> </div><!-- .site-name --> <?php             if ( function_exists( 'the_privacy_policy_link' ) ) {
                the_privacy_policy_link( '<div class="privacy-policy">', '</div>' );
            }
$custom_logo_id = get_theme_mod( 'custom_logo' );

    // We have a logo. Logo is go.     if ( $custom_logo_id ) {
        $custom_logo_attr = array(
            'class'   => 'custom-logo',
            'loading' => false,
        );

        $unlink_homepage_logo = (bool) get_theme_support( 'custom-logo', 'unlink-homepage-logo' );

        if ( $unlink_homepage_logo && is_front_page() && ! is_paged() ) {
            /* * If on the home page, set the logo alt attribute to an empty string, * as the image is decorative and doesn't need its purpose to be described. */
            $custom_logo_attr['alt'] = '';
        } else {
            /* * If the logo alt attribute is empty, get the site title and explicitly pass it * to the attributes used by wp_get_attachment_image(). */
            $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true );
            
<?php get_search_form(); ?> </li> <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. <li><h2><?php _e( 'Author' ); ?></h2> <p>A little something about you, the author. Nothing lengthy, just an overview.</p> </li> --> <?php                 if ( is_404() || is_category() || is_day() || is_month() ||
                is_year() || is_search() || is_paged() ) :
                    ?> <li> <?php if ( is_404() ) : /* If this is a 404 page */ ?> <?php elseif ( is_category() ) : /* If this is a category archive */ ?> <p> <?php                     printf(
                        /* translators: %s: Category name. */
                        __( 'You are currently browsing the archives for the %s category.' ),
                        single_cat_title( '', false )
                    );
Home | Imprint | This part of the site doesn't use cookies.