forked from CherryFramework/CherryFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtitle.php
100 lines (91 loc) · 3.55 KB
/
title.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
<section class="title-section">
<h1 class="title-header">
<?php
$shop_page = false;
if(function_exists( 'is_shop' )){
if(is_shop()){
$shop_page = true;
}
}
if(is_home()){ ?>
<?php $blog_text = apply_filters( 'cherry_text_translate', of_get_option('blog_text'), 'blog_text' ); ?>
<?php if($blog_text){?>
<?php echo $blog_text; ?>
<?php } else { ?>
<?php echo theme_locals("blog"); ?>
<?php } ?>
<?php } elseif ( is_category() ) { ?>
<?php printf( theme_locals("category_archives").": %s", '<small>' . single_cat_title( '', false ) . '</small>' ); ?>
<?php echo category_description(); /* displays the category's description from the Wordpress admin */ ?>
<?php } elseif ( is_tax('portfolio_category') ) { ?>
<?php echo theme_locals("portfolio_category").": "; ?>
<small><?php echo single_cat_title( '', false ); ?> </small>
<?php } elseif ( is_search() ) { ?>
<?php echo theme_locals("fearch_for").": ";?>"<?php the_search_query(); ?>"
<?php } elseif ( is_day() ) { ?>
<?php printf( theme_locals("daily_archives").": <small>%s</small>", get_the_date() ); ?>
<?php } elseif ( is_month() ) { ?>
<?php printf( theme_locals("monthly_archives").": <small>%s</small>", get_the_date('F Y') ); ?>
<?php } elseif ( is_year() ) { ?>
<?php printf( theme_locals("yearly_archives").": <small>%s</small>", get_the_date('Y') ); ?>
<?php } elseif ( is_author() ) { ?>
<?php
global $author;
$userdata = get_userdata($author);
?>
<?php echo theme_locals("by");?><?php echo $userdata->display_name; ?>
<?php } elseif ( is_tag() ) { ?>
<?php printf( theme_locals("tag_archives").": %s", '<small>' . single_tag_title( '', false ) . '</small>' ); ?>
<?php } elseif ( is_tax('portfolio_tag') ) { ?>
<?php echo theme_locals("portfolio_tag").": "; ?>
<small><?php echo single_tag_title( '', false ); ?> </small>
<!--Begin shop-->
<?php } elseif ($shop_page) {
if (class_exists( 'Woocommerce' ) && !is_single()){
if ( function_exists( 'wc_get_page_id' ) ) {
$page_id = wc_get_page_id( 'shop' );
} else {
$page_id = woocommerce_get_page_id( 'shop' );
}
} elseif (function_exists( 'jigoshop_init' ) && !is_singular()){
$page_id = jigoshop_get_page_id('shop');
}
echo get_page($page_id)->post_title;
?>
<!--End shop-->
<?php } else { ?>
<?php if (have_posts()) : while (have_posts()) : the_post();
$pagetitle = get_post_custom_values("page-title");
$pagedesc = get_post_custom_values("title-desc");
if($pagetitle == ""){
the_title();
} else {
echo $pagetitle[0];
}
if($pagedesc != ""){ ?>
<span class="title-desc"><?php echo $pagedesc[0];?></span>
<?php }
endwhile; endif;
wp_reset_query();
} ?>
</h1>
<?php
if (of_get_option('g_breadcrumbs_id') == 'yes') { ?>
<!-- BEGIN BREADCRUMBS-->
<?php
/* Begin shop */
if (function_exists( 'is_shop' ) && is_shop() || function_exists( 'is_product' ) && is_product()){
if(class_exists( 'Woocommerce' )){
woocommerce_breadcrumb(array('delimiter' => ' / ', 'wrap_before' => '<ul class="breadcrumb breadcrumb__t">', 'wrap_after' => '</ul>'));
} elseif(function_exists( 'jigoshop_init' )){
jigoshop_breadcrumb('/ ', '<ul class="breadcrumb breadcrumb__t">', '</ul>');
}
/* End shop */
} elseif (function_exists('breadcrumbs')) {
breadcrumbs();
};
?>
<!-- END BREADCRUMBS -->
<?php }
?>
</section><!-- .title-section -->