-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhome.php.bak.php
More file actions
executable file
·71 lines (54 loc) · 2.2 KB
/
Copy pathhome.php.bak.php
File metadata and controls
executable file
·71 lines (54 loc) · 2.2 KB
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
<?php get_header(); ?>
<?php get_template_part( 'parts/posts-header'); ?>
<div class="container frontpage-archive-container">
<div class="row">
<?php
if (term_exists('slider', 'category') ) {
$slider = get_category_by_slug( 'slider' );
$slider_cat = $slider->term_id;
}
$args = array (
'posts_per_page' => '1',
'ignore_sticky_posts' => false,
'category__not_in' => $slider_cat
);
$featured_query = new WP_Query( $args );
while ( $featured_query->have_posts() ) : $featured_query->the_post();
$do_not_duplicate = $post->ID; ?>
<div class="col-md-6 col-sm-12 front-page-featured">
<div class="front-page-post-featured-thumbnail"><?php the_post_thumbnail('large', array( 'class' => 'img-responsive' )); ?></div>
<div class="front-page-post-featured-content">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<span class="front-page-featured-date"><?php echo get_the_date(); ?></span>
<p><?php the_excerpt(); ?></p>
</div>
</div>
<?php endwhile; ?>
<?php
wp_reset_postdata();
global $post;
if (term_exists('slider', 'category') ) {
$slider = get_category_by_slug( 'slider' );
$slider_cat = $slider->term_id;
$args2 = array (
'category__not_in' => $slider_cat
);
}
$home_query = new WP_Query( array( $args2 ) );
if ( $home_query->have_posts() ) : while ( $home_query->have_posts() ) : the_post();
if ( $post->ID == $do_not_duplicate ) continue; ?>
<div class="col-md-3 col-xs-6 front-page-post-item">
<a href="<?php the_permalink(); ?>">
<div class="front-page-post-item-thumbnail"><?php the_post_thumbnail('uu-thumbnail', array( 'class' => 'img-responsive' )); ?></div>
<div class="front-page-post-item-title">
<span class="front-page-post-item-date"><?php echo get_the_date(); ?></span>
<h1><?php the_title(); ?></h1>
</div>
</a>
</div>
<?php endwhile; else : ?>
<?php get_template_part('includes/template','error'); // WordPress template error message ?>
<?php endif; ?>
</div><!-- /row -->
</div> <!-- /container -->
<?php get_footer();