-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-edugraphics-printables.php
97 lines (68 loc) · 2.77 KB
/
page-edugraphics-printables.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
/*
Template Name: Edugraphics & Printables
*/
?>
<?php get_header(); ?>
<header class="page-header">
<h1 class="page-title"><?php the_title(); ?></h1>
</header> <!-- end article header -->
<div id="content" class="halfsies">
<main id="main" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(' pageIntro'); ?> role="article" itemscope itemtype="https://schema.org/BlogPosting">
<section class="" itemprop="articleBody">
<?php the_content(); ?>
</section> <!-- end article section -->
</article> <!-- end article -->
<?php endwhile; endif; wp_reset_query(); ?> <!--reset page intro -->
<section id="recentEdugraphics">
<h3 class="pageSubhead">Recent Edugraphics <a href="https://www.itspronouncedmetrosexual.com/category/edugraphics/" alt="All Edugraphics">(show all)</a></h3>
<?php $edugraphics_query = new WP_Query(
array(
'posts_per_page' => 5,
'post_type' => 'post',
'tax_query' => array( //getting all posts in a custom taxonomy
array(
'taxonomy' => 'sections', //name of tax
'field' => 'slug', //can be by slug, name, or id
'terms' => 'edugraphics' //the slug of the custom tax
),
),
'orderby' => 'published',
'order' => 'DESC'
)
);
while($edugraphics_query->have_posts()) : $edugraphics_query->the_post();
loopShadowbox();
endwhile; wp_reset_postdata(); ?>
<a href="https://www.itspronouncedmetrosexual.com/category/edugraphics/" class="button button-wide" alt="All Edugraphics">View All Edugugraphics</a>
</section><!--/edugraphics-->
</main> <!-- end #main -->
<section id="printables" role="sidebar" class="sidebar">
<?php getPatreonAsk();?>
<h3 class="pageSubhead">Recent Printable Resources <a href="https://www.itspronouncedmetrosexual.com/section/printables/" title="All Printables">(show all)</a></h3>
<?php $printables_query = new WP_Query(
array(
'posts_per_page' => 10,
'post_type' => 'post',
'tax_query' => array( //getting all posts in a custom taxonomy
array(
'taxonomy' => 'sections', //name of tax
'field' => 'slug', //can be by slug, name, or id
'terms' => 'printables' //the slug of the custom tax
),
),
'orderby' => 'published',
'order' => 'DESC'
)
);
while($printables_query->have_posts()) : $printables_query->the_post();
if( get_field('downloadable_pdf') ):
loopBlogged();
endif;
endwhile; wp_reset_postdata(); ?>
<a href="https://www.itspronouncedmetrosexual.com/section/printables/" class="button button-wide" title="All Printables">View All Printable Resources</a>
</section><!--/printables-->
</div> <!-- end #content -->
<?php get_footer(); ?>