File tree 3 files changed +41
-5
lines changed
3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change 1
- <footer>
1
+ <!-- < footer>
2
2
3
- </footer>
3
+ </footer> -->
4
4
5
5
<script src="<?php echo get_bloginfo ( 'template_directory ' ); ?> /vocabulary/js/vocabulary.js"></script>
6
6
Original file line number Diff line number Diff line change 19
19
<body class="<?php echo $ args ['body-classes ' ]; ?> ">
20
20
<a class="skip-to-content" href="#main-content-marker">Skip to content</a>
21
21
22
- <header>
22
+ <!-- < header>
23
23
24
24
<h1>CC Thing</h1>
25
25
26
- </header>
26
+ </header> -->
27
27
28
28
<span id="main-content-marker"></span>
Original file line number Diff line number Diff line change 17
17
18
18
?>
19
19
20
- <?php get_header ($ embedded_template , array ( 'body-classes ' => 'course-page ' ) ); ?>
20
+ <?php
21
+
22
+ $ args = array (
23
+ 'post_parent ' => get_the_ID (), // Current post's ID
24
+ );
25
+ $ children = get_children ( $ args );
26
+
27
+ if ( ! empty ($ children ) ) {
28
+
29
+ $ isParent = true ;
30
+
31
+ } else {
32
+ $ isParent = false ;
33
+ }
34
+
35
+ if ($ isParent && !has_post_parent () ) {
36
+ $ contextType = 'course-index ' ;
37
+ } elseif (has_post_parent ()) {
38
+ $ contextType = 'course-page ' ;
39
+ }
40
+
41
+ ?>
42
+
43
+ <?php get_header ($ embedded_template , array ( 'body-classes ' => $ contextType ) ); ?>
21
44
22
45
<main>
23
46
24
47
<?php while ( have_posts () ) : the_post (); ?>
25
48
26
49
<header>
27
50
51
+ <nav class="breadcrumbs">
52
+ <ul>
53
+ <?php if ($ contextType == 'course-index ' ) : ?>
54
+ <li>Creative Commons</li>
55
+ <?php endif ; ?>
56
+ <?php if ($ contextType == 'course-page ' ) : ?>
57
+ <li><a href="#">Creative Commons</a></li>
58
+ <?php endif ; ?>
59
+
60
+ <li><a href="#">top title of course</a></li>
61
+ </ul>
62
+ </nav>
63
+
28
64
<h1><?php the_title (); ?> </h1>
29
65
30
66
<!-- <p>lead in paragraph</p> -->
You can’t perform that action at this time.
0 commit comments