-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsub-title.php
More file actions
87 lines (60 loc) · 2.09 KB
/
sub-title.php
File metadata and controls
87 lines (60 loc) · 2.09 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
86
87
<?php
// Breadcrumbs
require_once(get_template_directory(). '/lib/breadcrumbs.php');
global $post;
if( is_single() ) {
$title = zee_option('zee_blog_title');
$sub_title = zee_option('zee_blog_subtitle');
} elseif ( is_category() ) {
$title = __("Category", ZEETEXTDOMAIN) . " : " . single_cat_title("", false);
$sub_title = zee_option('zee_blog_subtitle');
} elseif ( is_archive() ) {
if (is_day()) {
$title = __("Daily Archives", ZEETEXTDOMAIN) . " : " . get_the_date();
} elseif (is_month()) {
$title = __("Monthly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("F Y");
} elseif (is_year()) {
$title = __("Yearly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("Y");
} else {
$title = __("Blog Archives", ZEETEXTDOMAIN);
}
$sub_title = zee_option('zee_blog_subtitle');
} elseif ( is_tag() ) {
$title = $return .= __("Tag", ZEETEXTDOMAIN) . " : " . single_tag_title("", false);
} elseif ( is_author() ) {
$title = __("Author: ", ZEETEXTDOMAIN);
} elseif ( is_search() ) {
$title = __("Search results for", ZEETEXTDOMAIN) . " : " . get_search_query();
} elseif ( is_tax( 'portfolios' ) ) {
$title = __("Portfolio", ZEETEXTDOMAIN);
} elseif ( is_home() and !is_front_page() ) {
$page = get_queried_object();
if( is_null( $page ) ){
$title = zee_option('zee_blog_title');
$sub_title = zee_option('zee_blog_subtitle');
} else {
$ID = $page->ID;
$title = $page->post_title;
$sub_title = get_post_meta($ID, 'page_subtitle', true);
}
} elseif ( (is_page()) && (!is_front_page()) ) {
$page = get_queried_object();
$ID = $page->ID;
$title = $page->post_title;
$sub_title = get_post_meta($ID, 'page_subtitle', true);
} elseif( is_front_page() ){
unset($title);
}
echo (isset($title) ? '
<section id="title" class="emerald">
<div class="container">
<div class="row">
<div class="col-sm-6">
<h1>'.$title.'</h1>
<p>'.$sub_title.'</p>
</div>
<div class="col-sm-6">'.zee_breadcrumb().'</div>
</div>
</div>
</section>
' : '');