-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.php
More file actions
executable file
·85 lines (60 loc) · 2.33 KB
/
main.php
File metadata and controls
executable file
·85 lines (60 loc) · 2.33 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/* Woggle 4 Wordpress Remix
*
* Woggle 4 Wordpress Remix is a free Wordpress theme derived from Woggle 4 Wordpress
* developed by hawesWeb Productions available at iscout4wordpress.org.uk
*
* Woggle 4 Wordpress Remix is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Woggle 4 Wordpress Remix is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Woggle 4 Wordpress Remix. If not, see <http://www.gnu.org/licenses/>.
*
*/
?>
<div id="front-popular" class="clearfloat">
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post_<?php the_ID(); ?>">
<?php
// Skip using the_title() for specific pages and give a custom header instead
// GNU GPL 3 or later.
// Once again we give thanks unto Daniel
// REQUEST_URI is /page
$path = $_SERVER['REQUEST_URI'];
// Define pages to have custom headers
$search_array = [
// format
// "/page" => 'image',
"/beavers" => 'beavers.jpg',
"/cubs" => 'cubs.jpg',
"/scouts" => 'scouts.jpg',
"/volunteer" => 'gryllykins.png'
];
// If $search_array matches $path, give the value as page title
if (array_key_exists($path, $search_array)) {
echo '<img src=' . get_stylesheet_directory_uri() . '/images/headers/' . $search_array[$path] . ' alt="' . the_title(null, null, false) . '" />';
}
// If it doesn't, just do the regular title
else {
echo '<h2 class="title">'; the_title(); echo '</h2>';
}
?>
<div class="entry clearfloat">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</div>
<?php endwhile; endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>