-
Notifications
You must be signed in to change notification settings - Fork 6
/
404.php
59 lines (45 loc) · 1.01 KB
/
404.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
<?php
/**
* @package WordPress
* @subpackage Tersus
*/
?>
<?php get_header(); ?>
<?php
/*
* The category_base and tag_base values are null by default
* and only return a value if they have been set by the user.
*
* cf. Settings > Permalinks > Optional
*/
$c = get_option('category_base');
if ($c == '') {
$category_base = "/category/";
} else {
$category_base = "/" . $c . "/";
}
$t = get_option('tag_base');
if ($t == '') {
$tag_base = "/tag/";
} else {
$tag_base = "/" . $t . "/";
}
?>
<section id="content">
<?php if ($_SERVER['REQUEST_URI'] == $category_base) { ?>
<h2>Available Categories</h2>
<ul>
<?php wp_list_categories('style=list&title_li='); ?>
</ul>
<?php } elseif ($_SERVER['REQUEST_URI'] == $tag_base) { ?>
<h2>Available Tags</h2>
<ul>
<?php wp_tag_cloud(); ?>
</ul>
<?php } else { ?>
<h2>Not found.</h2>
<p>Sorry, you seem to be looking for something that simply isn’t here.</p>
<?php } ?>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>