How to implement a different markup for pagination pages WordPress?

Faced with the task that you need to create a different design for the first 2 blocks of the output of a digest of the news and the remaining units teasers should have a standard design. This will be done by the principle:
<?php $loop = 0; ?>
<?php if(have_posts()) : while(have_posts()) : the_post();?>
<?php $loop++; ?>
<?php if( $loop == 1) {
//Do action for large image
} elseif( $loop == 2 ) {
//Do action for big image
} elseif( $loop --> 3 ) {
//Do action for small image
<?php endwhile; endif;?>

But the problem is that the rest of pagination pages have exactly the same layout as the main, although by design, all the blocks on the other pages should be the same. The second task is to make the main 8 teaser, and the rest at 10. Tried is_home, but for any tasks he did not come.
July 8th 19 at 15:48
1 answer
July 8th 19 at 15:50
is_paged() will help You in one, and is_front_page() in another
The first task I think will help, but how to make a different number of teasers on the home and rest? - dominique.Croo commented on July 8th 19 at 15:53
: added the answer - guillermo_Nienow30 commented on July 8th 19 at 15:56
: is_front_page() doesn't work on a different number of news. 've tried. - dominique.Croo commented on July 8th 19 at 15:59
then dig to the side of a pair of loops, just for the last offset to use, which is equal to the number of entries in the first two blocks of teasers - guillermo_Nienow30 commented on July 8th 19 at 16:02

Find more questions by tags PHPWordPress