-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.php
141 lines (115 loc) · 2.83 KB
/
sitemap.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
/**
* @package WordPress
* @subpackage Oakland
* @since Oakland 1.0
*
* Template Name: Sitemap
* Created by CMSMasters
*
*/
get_header();
global $sitemap_pages_show,
$sitemap_categories_show,
$sitemap_archives_show;
$page_layout = get_post_meta(get_the_ID(), 'page_layout', true);
if (!$page_layout) {
$page_layout = 'nobg';
}
if ($page_layout != 'nobg') {
$image_width = 760;
$image_height = 430;
} else {
$image_width = 1180;
$image_height = 665;
}
?>
<!--_________________________ Start Content _________________________ -->
<?php
if ($page_layout == 'sidebar_bg') {
echo '<section id="content">';
} elseif ($page_layout == 'sidebar_bg sidebar_left') {
echo '<section id="content" class="fr">';
} else {
echo '<section id="middle_content">';
}
echo '<div class="entry">';
if (have_posts()) : the_post();
if (has_post_thumbnail()) {
cmsms_thumb(get_the_ID(), $image_width, $image_height, false, 'prettyPhoto');
}
if (get_the_content() != '') {
echo '<div class="entry-content">';
the_content();
echo '</div>';
wp_link_pages('before=<div class="subpage_nav"><strong>' . __('Pages', 'cmsmasters') . ':</strong>&link_before= [ &link_after= ] &after=</div>');
echo '<br />' .
'<div class="divider"></div>' .
'<br />';
}
endif;
if ($sitemap_pages_show) {
?>
<div class="one_third">
<h2><?php _e('Pages', 'cmsmasters'); ?></h2>
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'container' => '',
'sort_column' => 'menu_order',
'menu_class' => 'sitemap navigation_menu'
));
?>
</div>
<?php
}
if ($sitemap_categories_show) {
?>
<div class="one_third">
<h2><?php _e('Categories', 'cmsmasters'); ?></h2>
<ul class="sitemap">
<?php
wp_list_categories(array(
'title_li' => '',
'orderby' => 'name',
'order' => 'ASC'
));
?>
</ul>
</div>
<?php
}
if ($sitemap_archives_show) {
?>
<div class="one_third">
<h2><?php _e('Archives', 'cmsmasters'); ?></h2>
<ul class="sitemap">
<?php
wp_get_archives(array('show_post_count' => true,
'format' => 'custom',
'before' => '<li>',
'after' => '</li>'
));
?>
</ul>
</div>
<?php
}
echo '</div>' .
'</section>';
?>
<!-- _________________________ Finish Content _________________________ -->
<!-- _________________________ Start Sidebar _________________________ -->
<?php
if ($page_layout == 'sidebar_bg') {
echo '<section id="sidebar">';
get_sidebar();
echo '</section>';
} elseif ($page_layout == 'sidebar_bg sidebar_left') {
echo '<section id="sidebar" class="fl">';
get_sidebar();
echo '</section>';
}
?>
<!-- _________________________ Finish Sidebar _________________________ -->
<?php get_footer(); ?>