Skip to content

Instantly share code, notes, and snippets.

@mihadaiko
Created July 22, 2016 05:58
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/c4a9ef6f19c4b57cb239971d5e21d594 to your computer and use it in GitHub Desktop.
Save mihadaiko/c4a9ef6f19c4b57cb239971d5e21d594 to your computer and use it in GitHub Desktop.
<?php get_header() ?>
<div class="row main-slider">
<?php include (ABSPATH . '/wp-content/plugins/wp-featured-content-slider/content-slider.php'); ?>
</div>
<div class="row advertisement"><img src="/wp-content/themes/get-versed-media/img/v/views.png"></div>
<div style="clear:both;"></div>
<div class="row container">
<?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 ''; ?>
<div class="row column first-post" style="float:left;">
<a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php the_post_thumbnail('first-post'); ?>
</a>
<div class="small-8 column first-post-title-div">
<h1 class="first-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</div>
<div class="medium-2 column first-post-category">
<h1 class="category-first">POLITICS</h1>
</div>
</div>
<?php elseif (1 < $count && $count <= 3 && $paged === 1) :
if ($count === 2 ) echo ''; ?>
<div class="medium-8 column second-set-post">
<a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php the_post_thumbnail('second-post'); ?>
</a>
<div class="small-8 column second-post-title-div">
<h1 class="second-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</div>
<div class="medium-2 column second-post-category">
<h1 class="category-second">NEWS</h1>
</div>
</div>
<?php elseif (3 < $count && $count <= 8 && $paged === 1) :
if ($count === 5) echo '<div style="clear:both;"></div><div class="medium-5 column music-headlines"><h1 class="music-headline-title">MUSIC NEWS</h1></div>'; ?>
<div class="medium-6 column third-set-post">
<a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php the_post_thumbnail('third-post'); ?>
</a>
<div class="small-8 column third-post-title-div">
<h1 class="second-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</div>
<div class="medium-2 column third-post-category">
<h1 class="category-third">NEWS</h1>
</div>
</div>
<?php elseif (8 < $count && $count <= 17 && $paged === 1) :
if ($count === 9) echo '<div style="clear:both;"></div><div class="row div-break-first" style="margin:10px 0px 10px 0px;"></div>'; ?>
<div class="medium-8 column fourth-post-wrap">
<div class="medium-8 fourth-post-img"> <a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php the_post_thumbnail('fourth-post'); ?>
</a>
</div>
<div class="fourth-post-inner">
<h1 class="fourth-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</div>
</div>
<?php elseif (17 < $count && $count <= 27 && $paged === 1) :
if ($count === 10) echo '<div style="clear:both;"></div><div class="row div-break-first" style="margin:10px 0px 10px 0px;"></div>'; ?>
<div class="medium-8 column fifth-post" style="background:#fff; margin:0px 25px 20px 0px; padding:0; float:left;">
<a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php the_post_thumbnail('fifth-post'); ?>
</a>
<div class="row column">
<h1 class="fifth-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><h1>
</div>
</div>
<?php endif;
endwhile; ?>
<?php
endif;?>
</div>
<div class="row column advertisement" style="margin-bottom:20px; height:200px; background:#000;"></div>
</div>
<?php get_footer() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment