-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtemplate-agitprop.php
54 lines (38 loc) · 1.21 KB
/
template-agitprop.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
<?php
/*
Template Name: AgitProp (General)
*/
?>
<?php get_template_part( 'parts/header', 'agitprop' ); ?>
<header id="masthead" class="grid grid-container">
<div class="title width-6">
<span class="parent-site-name bold">
<?php
// get the page name
$parent_title = get_the_title($post->post_parent);
// display page name
echo $parent_title;
// Use as a conditional tag
// If pagent page is named Archives
if($parent_title=="Archives"):
//do something
else:
//do something else
endif;
?>
</span>
<nav aria-label="You are here:" role="navigation" class="top-bar">
<small><?php if (function_exists('the_breadcrumb')) the_breadcrumb(); ?></small>
</nav>
</div>
<div class="space width-6">
</div>
</header>
<div id="content" class="grid grid-container">
<main id="main" class="cell width-12" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php get_template_part( 'parts/loop', 'pageagitprop' ); ?>
<?php endwhile; endif; ?>
</main> <!-- end #main -->
</div> <!-- end #content -->
<?php get_template_part( 'parts/footer', 'agitprop' ); ?>