• The pagination on the top is ok, bottomside is a problem, it should stay out of the grid (and the grid isnt correctly filled). My archive.php page:

    get_header();
    ?>
    
    <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
    
    	<div class="navigazione"><?php wp_pagenavi(); ?></div>
    <main id="primary" class="site-main">
    
    
    		<?php if ( have_posts() ) : ?>
    
    			
    
    			<?php
    			/* Start the Loop */
    			while ( have_posts() ) :
    				the_post();
    
    				/*
    				 * Include the Post-Type-specific template for the content.
    				 * If you want to override this in a child theme, then include a file
    				 * called content-___.php (where ___ is the Post Type name) and that will be used instead.
    				 */
    				get_template_part( 'template-parts/content', get_post_type() );
    
    
    			endwhile;
                   wp_pagenavi();
    		
    
    
    		else :
    
    			get_template_part( 'template-parts/content', 'none' );
    
    		endif;
    
    
    		?>
    
    
    	</main><!-- #main -->
    
    <?php
    get_sidebar();
    get_footer();
    

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sacconi

    (@sacconi)

    ok, I put it after the sidebar and it works

    Thread Starter sacconi

    (@sacconi)

    How could I say that this funcion:

    wp_pagenavi();

    works only for big screen? the layout is ok for desktops but on mobile I got the navigation under the sidebar (which is displayed under the main container)

    Moderator bcworkz

    (@bcworkz)

    PHP doesn’t have a convenient way to know what size screen a user has. The closest we can come is whether the request’s user agent string appears to be for a mobile device or not. This is how wp_is_mobile() determines what value to return. You could do:

    // no page navi on mobiles
    if ( ! wp_is_mobile()) { wp_pagenavi();}

    However, don’t forget that some mobile tablet devices have screen resolutions similar to or greater than some non-mobile laptops. You have much finer control over layout by screen size with CSS media queries. You can always hide undesirable content with CSS. However, the device is still forced to load the related data even though it will be invisible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘problems with the pagination down page’ is closed to new replies.