-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
72 lines (65 loc) · 2.21 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package hype
*/
require get_template_directory().'/inc/shares.php';
get_header(); ?>
<div class="onepcssgrid-1000 clearfix">
<div class="onerow clearfix">
<div class="col12 clearfix">
<h4 class="block-title">
<span>LATEST POSTS</span>
</h4>
<div id="primary" class="content-area clearfix">
<main id="main" class="site-main" role="main">
<?php $post_counter=0; ?>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'post',
'tag__not_in' => '81',
'paged'=>$paged
);
$query2 = new WP_Query( $args );
?>
<?php if ( $query2->have_posts() ) : ?>
<div class="clearfix" id="container">
<?php /* Start the Loop */ ?>
<?php while ( $query2->have_posts() ) : $query2->the_post(); ?>
<?php
/* Include the Post-Format-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 Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php
$post_counter++;
if ($post_counter == 7) { ?>
<article class="post ad-1">
<a href="#"><img src="http://pagead2.googlesyndication.com/simgad/14174689887408439789" alt=""></a>
</article>
<!-- /.post ad -->
<?php } ?>
<?php endwhile; ?>
</div>
<!-- /.container -->
<?php else : ?>
<?php /* Restore original Post Data */
wp_reset_postdata();?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
</div>
<!-- /.col9 -->
<?php hype_paging_nav(); ?>
<?php get_footer(); ?>