Skip to content

Instantly share code, notes, and snippets.

@mihadaiko
Last active July 22, 2016 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mihadaiko/dc314a845f807c16d19db8c842ed7a75 to your computer and use it in GitHub Desktop.
Save mihadaiko/dc314a845f807c16d19db8c842ed7a75 to your computer and use it in GitHub Desktop.
<?php if (have_posts()) :
$count = 0; $paged = ( get_query_var('paged') > 1 ) ? get_query_var('paged') : 1;
while (have_posts()) : the_post();
$count++;
if ($count <= 1 && $paged === 1) :
if ($count === 1) echo ''; ?>
******First Post HTML/CSS/PHP GOES HERE******
<?php elseif (1 < $count && $count <= 3 && $paged === 1) :
if ($count === 2 ) echo ''; ?>
******Next Two Posts HTML/CSS/PHP GOES HERE******
<?php elseif (3 < $count && $count <= 8 && $paged === 1) :
if ($count === 5) echo 'DIV/CONTENT BEFORE THE NEXT 5 POSTS GOES HERE; ?>
******Next Five Posts HTML/CSS/PHP GOES HERE******
<?php elseif (8 < $count && $count <= 17 && $paged === 1) :
if ($count === 9) echo 'DIV/CONTENT BEFORE THE NEXT 9 POSTS GOES HERE'; ?>
******Next Nine Posts HTML/CSS/PHP GOES HERE******
<?php elseif (17 < $count && $count <= 27 && $paged === 1) :
if ($count === 10) echo 'DIV/CONTENT BEFORE THE NEXT 10 POST GOES HERE'; ?>
******Next Ten Posts HTML/CSS/PHP GOES HERE******
<?php endif;
endwhile; ?>
<?php
endif;?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment