本文整理汇总了PHP中x_is_shop函数的典型用法代码示例。如果您正苦于以下问题:PHP x_is_shop函数的具体用法?PHP x_is_shop怎么用?PHP x_is_shop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了x_is_shop函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ups_display_sidebar
function ups_display_sidebar($default_sidebar)
{
$q_object = get_queried_object();
$sidebars = get_option('ups_sidebars');
foreach ($sidebars as $id => $sidebar) {
if (is_singular()) {
if (array_key_exists('pages', $sidebar)) {
if (array_key_exists('children', $sidebar) && $sidebar['children'] == 'on') {
$child = array_key_exists($q_object->post_parent, $sidebar['pages']);
} else {
$child = false;
}
if (array_key_exists($q_object->ID, $sidebar['pages']) || $child) {
return $id;
}
}
} elseif (is_home()) {
if (array_key_exists('index-blog', $sidebar) && $sidebar['index-blog'] == 'on') {
return $id;
}
} elseif (is_tax() || is_category() || is_tag()) {
if (array_key_exists('taxonomies', $sidebar)) {
if (array_key_exists($q_object->term_id, $sidebar['taxonomies'])) {
return $id;
}
}
} elseif (x_is_shop()) {
if (array_key_exists('index-shop', $sidebar) && $sidebar['index-shop'] == 'on') {
return $id;
}
}
}
return $default_sidebar;
}
示例2: x_get_content_layout
function x_get_content_layout()
{
$content_layout = x_get_option('x_layout_content', 'content-sidebar');
if ($content_layout != 'full-width') {
if (is_home()) {
$opt = x_get_option('x_blog_layout', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} elseif (is_singular('post')) {
$meta = get_post_meta(get_the_ID(), '_x_post_layout', true);
$layout = $meta == 'on' ? 'full-width' : $content_layout;
} elseif (x_is_portfolio_item()) {
$layout = 'full-width';
} elseif (x_is_portfolio()) {
$meta = get_post_meta(get_the_ID(), '_x_portfolio_layout', true);
$layout = $meta == 'sidebar' ? $content_layout : $meta;
} elseif (is_page_template('template-layout-content-sidebar.php')) {
$layout = 'content-sidebar';
} elseif (is_page_template('template-layout-sidebar-content.php')) {
$layout = 'sidebar-content';
} elseif (is_page_template('template-layout-full-width.php')) {
$layout = 'full-width';
} elseif (is_archive()) {
if (x_is_shop() || x_is_product_category() || x_is_product_tag()) {
$opt = x_get_option('x_woocommerce_shop_layout_content', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} else {
$opt = x_get_option('x_archive_layout', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
}
} elseif (x_is_product()) {
$layout = 'full-width';
} elseif (x_is_bbpress()) {
$opt = x_get_option('x_bbpress_layout_content', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} elseif (x_is_buddypress()) {
$opt = x_get_option('x_buddypress_layout_content', 'sidebar');
$layout = $opt == 'sidebar' ? $content_layout : $opt;
} elseif (is_404()) {
$layout = 'full-width';
} else {
$layout = $content_layout;
}
} else {
$layout = $content_layout;
}
return $layout;
}
示例3: x_get_content_layout
function x_get_content_layout()
{
$stack = x_get_stack();
$mod = get_theme_mod('x_' . $stack . '_layout_content');
$content_layout = $mod == '' ? 'content-sidebar' : $mod;
if ($content_layout != 'full-width') {
if (is_home()) {
$mod = get_theme_mod('x_blog_layout');
$layout = $mod == 'sidebar' ? $content_layout : $mod;
} elseif (is_singular('post')) {
$meta = get_post_meta(get_the_ID(), '_x_post_layout', true);
$layout = $meta == 'on' ? 'full-width' : $content_layout;
} elseif (x_is_portfolio_item()) {
$layout = 'full-width';
} elseif (x_is_product()) {
$layout = 'full-width';
} elseif (x_is_portfolio()) {
$meta = get_post_meta(get_the_ID(), '_x_portfolio_layout', true);
$layout = $meta == 'sidebar' ? $content_layout : $meta;
} elseif (is_page_template('template-layout-content-sidebar.php')) {
$layout = 'content-sidebar';
} elseif (is_page_template('template-layout-sidebar-content.php')) {
$layout = 'sidebar-content';
} elseif (is_page_template('template-layout-full-width.php')) {
$layout = 'full-width';
} elseif (is_archive()) {
if (x_is_shop()) {
$mod = get_theme_mod('x_woocommerce_shop_layout_content');
$layout = $mod == 'sidebar' ? $content_layout : $mod;
} else {
$mod = get_theme_mod('x_archive_layout');
$layout = $mod == 'sidebar' ? $content_layout : $mod;
}
} elseif (x_is_product()) {
$layout = 'full-width';
} elseif (is_404()) {
$layout = 'full-width';
} else {
$layout = $content_layout;
}
} else {
$layout = $content_layout;
}
return $layout;
}
示例4: elseif
?>
<?php
if (is_page() && $disable_page_title == 'on') {
?>
<?php
} else {
?>
<header class="x-header-landmark">
<div class="x-container max width">
<div class="x-landmark-breadcrumbs-wrap">
<div class="x-landmark">
<?php
if (x_is_shop() || x_is_product()) {
?>
<h1 class="h-landmark"><span><?php
echo x_get_option('x_renew_shop_title');
?>
</span></h1>
<?php
} elseif (x_is_bbpress()) {
?>
<h1 class="h-landmark"><span><?php
echo get_the_title();
?>
</span></h1>
示例5: x_get_the_ID
function x_get_the_ID()
{
global $post;
if (is_home()) {
$id = get_option('page_for_posts');
} elseif (x_is_shop()) {
$id = woocommerce_get_page_id('shop');
} elseif (is_404()) {
$id = NULL;
} else {
$id = $post->ID;
}
return $id;
}
示例6: get_option
<?php
// =============================================================================
// VIEWS/GLOBAL/_SLIDER-ABOVE.PHP
// -----------------------------------------------------------------------------
// Slider output above all page content.
// =============================================================================
if (X_REVOLUTION_SLIDER_IS_ACTIVE) {
global $post;
if (is_home()) {
$id = get_option('page_for_posts');
} elseif (x_is_shop()) {
$id = woocommerce_get_page_id('shop');
} else {
$id = $post->ID;
}
$slider_active = get_post_meta($id, '_x_slider_above', true);
$slider = $slider_active == '' ? 'Deactivated' : $slider_active;
if ($slider != 'Deactivated') {
$bg_video = get_post_meta($id, '_x_slider_above_bg_video', true);
$bg_video_poster = get_post_meta($id, '_x_slider_above_bg_video_poster', true);
$anchor = get_post_meta($id, '_x_slider_above_scroll_bottom_anchor_enable', true);
$anchor_alignment = get_post_meta($id, '_x_slider_above_scroll_bottom_anchor_alignment', true);
$anchor_color = get_post_meta($id, '_x_slider_above_scroll_bottom_anchor_color', true);
$anchor_color_hover = get_post_meta($id, '_x_slider_above_scroll_bottom_anchor_color_hover', true);
?>
<div class="x-slider-container above<?php
if ($bg_video != '') {
echo ' bg-video';
}
示例7: x_is_product_index
function x_is_product_index()
{
if (x_is_shop() || x_is_product_category() || is_product_tag()) {
return true;
} else {
return false;
}
}
示例8: the_title
?>
<h1 class="h-landmark"><span><?php
the_title();
?>
</span></h1>
<?php
}
?>
<?php
x_portfolio_filters();
?>
</header>
<?php
}
} elseif (x_is_shop() && x_get_option('x_integrity_shop_header_enable', '1') == '1') {
?>
<header class="x-header-landmark x-container max width">
<h1 class="h-landmark"><span><?php
echo x_get_option('x_integrity_shop_title');
?>
</span></h1>
<p class="p-landmark-sub"><span><?php
echo x_get_option('x_integrity_shop_subtitle');
?>
</span></p>
</header>
<?php
} elseif (x_is_buddypress()) {
示例9: x_breadcrumbs
//.........这里部分代码省略.........
echo $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_category()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after;
} else {
echo $current_before . single_cat_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (x_is_product_tag()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after;
} else {
echo $current_before . single_tag_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (is_search()) {
echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after;
} elseif (is_singular('post')) {
if (get_option('page_for_posts') == is_front_page()) {
echo $current_before . $page_title . $current_after;
} else {
if ($is_ltr) {
echo '<a href="' . get_permalink(get_option('page_for_posts')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink(get_option('page_for_posts')) . '">' . $blog_title . '</a>';
}
}
} elseif (x_is_portfolio()) {
echo $current_before . get_the_title() . $current_after;
} elseif (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
$title = x_get_parent_portfolio_title();
if ($is_ltr) {
echo '<a href="' . $link . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . $link . '">' . $title . '</a>';
}
} elseif (x_is_product()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . $shop_link;
}
} elseif (x_is_buddypress()) {
if (bp_is_group()) {
echo '<a href="' . bp_get_groups_directory_permalink() . '">' . x_get_option('x_buddypress_groups_title') . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
} elseif (bp_is_user()) {
echo '<a href="' . bp_get_members_directory_permalink() . '">' . x_get_option('x_buddypress_members_title') . '</a>' . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
} else {
echo $current_before . x_buddypress_get_the_title() . $current_after;
}
} elseif (x_is_bbpress()) {
remove_filter('bbp_no_breadcrumb', '__return_true');
if (bbp_is_forum_archive()) {
echo $current_before . bbp_get_forum_archive_title() . $current_after;
} else {
echo bbp_get_breadcrumb();
}
add_filter('bbp_no_breadcrumb', '__return_true');
} elseif (is_page() && !$post_parent) {
echo $current_before . $page_title . $current_after;
} elseif (is_page() && $post_parent) {
$parent_id = $post_parent;
$breadcrumbs = array();
if (is_rtl()) {
echo $current_before . $page_title . $current_after . $delimiter;
}
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
if ($is_ltr) {
$breadcrumbs = array_reverse($breadcrumbs);
}
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs) - 1) {
echo $delimiter;
}
}
if ($is_ltr) {
echo $delimiter . $current_before . $page_title . $current_after;
}
} elseif (is_tag()) {
echo $current_before . single_tag_title('', false) . $current_after;
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”';
} elseif (is_404()) {
echo $current_before . __('404 (Page Not Found)', '__x__') . $current_after;
} elseif (is_archive()) {
if (x_is_shop()) {
echo $current_before . $shop_title . $current_after;
} else {
echo $current_before . __('Archives ', '__x__') . $current_after;
}
}
echo '</div>';
}
}
示例10: x_breadcrumbs
//.........这里部分代码省略.........
$page_title = get_the_title();
$blog_title = get_the_title(get_option('page_for_posts', true));
$post_parent = $post->post_parent;
if (function_exists('woocommerce_get_page_id')) {
$shop_url = x_get_shop_link();
$shop_title = get_theme_mod('x_' . $stack . '_shop_title');
$shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>';
}
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;
if (is_home()) {
echo $current_before . $blog_title . $current_after;
} elseif (is_category()) {
$the_cat = get_category(get_query_var('cat'), false);
if ($the_cat->parent != 0) {
echo get_category_parents($the_cat->parent, TRUE, $delimiter);
}
echo $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_category()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after;
} else {
echo $current_before . single_cat_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (x_is_product_tag()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after;
} else {
echo $current_before . single_tag_title('', false) . $current_after . $delimiter . $shop_link;
}
} elseif (is_search()) {
echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after;
} elseif (is_singular('post')) {
if (get_option('page_for_posts') == is_front_page()) {
echo $current_before . $page_title . $current_after;
} else {
if ($is_ltr) {
echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>';
}
}
} elseif (x_is_portfolio()) {
echo $current_before . get_the_title() . $current_after;
} elseif (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
$title = x_get_parent_portfolio_title();
if ($is_ltr) {
echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>';
}
} elseif (x_is_product()) {
if ($is_ltr) {
echo $shop_link . $delimiter . $current_before . $page_title . $current_after;
} else {
echo $current_before . $page_title . $current_after . $delimiter . $shop_link;
}
} elseif (is_page() && !$post_parent) {
echo $current_before . $page_title . $current_after;
} elseif (is_page() && $post_parent) {
$parent_id = $post_parent;
$breadcrumbs = array();
if (is_rtl()) {
echo $current_before . $page_title . $current_after . $delimiter;
}
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
if ($is_ltr) {
$breadcrumbs = array_reverse($breadcrumbs);
}
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs) - 1) {
echo $delimiter;
}
}
if ($is_ltr) {
echo $delimiter . $current_before . $page_title . $current_after;
}
} elseif (is_tag()) {
echo $current_before . single_tag_title('', false) . $current_after;
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”';
} elseif (is_404()) {
echo $current_before . __('404 (Page Not Found)', '__x__') . $current_after;
} elseif (is_archive()) {
if (x_is_shop()) {
echo $current_before . $shop_title . $current_after;
} else {
echo $current_before . __('Archives ', '__x__') . $current_after;
}
}
echo '</div>';
}
}
示例11: x_body_class
function x_body_class($output)
{
$stack = x_get_stack();
$entry_id = get_the_ID();
$is_blog = is_home();
$blog_style_masonry = x_get_option('x_blog_style', 'standard') == 'masonry';
$post_meta_disabled = x_get_option('x_blog_enable_post_meta', '') == '';
$is_archive = is_archive();
$archive_style_masonry = x_get_option('x_archive_style', 'standard') == 'masonry';
$is_shop = x_is_shop();
$is_page = is_page();
$page_title_disabled = get_post_meta($entry_id, '_x_entry_disable_page_title', true) == 'on';
$is_portfolio = is_page_template('template-layout-portfolio.php');
$portfolio_meta_disabled = x_get_option('x_portfolio_enable_post_meta', '') == '';
$integrity_design_dark = x_get_option('x_integrity_design', 'light') == 'dark';
$icon_blank_sidebar_active = $stack == 'icon' && get_post_meta($entry_id, '_x_icon_blank_template_sidebar', true) == 'Yes';
$ethos_post_slider_blog_active = $stack == 'ethos' && is_home() && x_get_option('x_ethos_post_slider_blog_enable', '') == 1;
$ethos_post_slider_archive_active = $stack == 'ethos' && (is_category() || is_tag()) && x_get_option('x_ethos_post_slider_archive_enable', '') == 1;
$custom_class = get_post_meta($entry_id, '_x_entry_body_css_class', true);
//
// Stack.
//
$output[] .= 'x-' . $stack;
if ($stack == 'integrity') {
if ($integrity_design_dark) {
$output[] .= 'x-integrity-dark';
} else {
$output[] .= 'x-integrity-light';
}
}
//
// Navbar.
//
switch (x_get_navbar_positioning()) {
case 'static-top':
$output[] .= 'x-navbar-static-active';
break;
case 'fixed-top':
$output[] .= 'x-navbar-fixed-top-active';
break;
case 'fixed-left':
$output[] .= 'x-navbar-fixed-left-active';
break;
case 'fixed-right':
$output[] .= 'x-navbar-fixed-right-active';
break;
}
if (x_is_one_page_navigation()) {
$output[] .= 'x-one-page-navigation-active';
}
//
// Site layout.
//
switch (x_get_site_layout()) {
case 'boxed':
$output[] .= 'x-boxed-layout-active';
break;
case 'full-width':
$output[] .= 'x-full-width-layout-active';
break;
}
//
// Content layout.
//
switch (x_get_content_layout()) {
case 'content-sidebar':
$output[] .= 'x-content-sidebar-active';
break;
case 'sidebar-content':
$output[] .= 'x-sidebar-content-active';
break;
case 'full-width':
$output[] .= 'x-full-width-active';
break;
}
//
// Blog and posts.
//
if ($is_blog) {
if ($blog_style_masonry) {
$output[] .= 'x-masonry-active x-blog-masonry-active';
} else {
$output[] .= 'x-blog-standard-active';
}
}
if ($post_meta_disabled) {
$output[] .= 'x-post-meta-disabled';
}
//
// Archives.
//
if ($is_archive && !$is_shop) {
if ($archive_style_masonry) {
$output[] .= 'x-masonry-active x-archive-masonry-active';
} else {
$output[] .= 'x-archive-standard-active';
}
}
//
// Pages.
//.........这里部分代码省略.........
示例12: elseif
<?php
} elseif (x_is_portfolio()) {
?>
<header class="x-header-landmark x-container-fluid max width">
<h1 class="h-landmark"><span><?php
the_title();
?>
</span></h1>
<?php
x_portfolio_filters();
?>
</header>
<?php
} elseif (x_is_shop() && get_theme_mod('x_integrity_shop_header_enable') == 1) {
?>
<header class="x-header-landmark x-container-fluid max width">
<h1 class="h-landmark"><span><?php
echo get_theme_mod('x_integrity_shop_title');
?>
</span></h1>
<p class="p-landmark-sub"><span><?php
echo get_theme_mod('x_integrity_shop_subtitle');
?>
</span></p>
</header>
<?php
}
示例13: x_breadcrumbs
//.........这里部分代码省略.........
// 8. Get shop title.
//
global $post, $wp;
if (geodir_is_page('detail') || geodir_is_page('listing') || isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id()) {
geodir_breadcrumb();
} else {
$stack = x_get_stack();
$delimiter = ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> ';
// 1
$home_text = '<span class="home"><i class="x-icon-home"></i></span>';
// 2
$home_link = home_url();
// 3
$current_before = '<span class="current">';
// 4
$current_after = '</span>';
// 5
$page_title = get_the_title();
// 6
$blog_title = get_the_title(get_option('page_for_posts', true));
// 7
$shop_title = get_theme_mod('x_' . $stack . '_shop_title');
// 8
if (function_exists('woocommerce_get_page_id')) {
$shop_url = x_get_shop_link();
$shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>';
}
if (is_front_page()) {
echo '<div class="x-breadcrumbs">' . $current_before . $home_text . $current_after . '</div>';
} elseif (is_home()) {
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter . $current_before . $blog_title . $current_after . '</div>';
} else {
echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter;
if (is_category()) {
$the_cat = get_category(get_query_var('cat'), false);
if ($the_cat->parent != 0) {
echo get_category_parents($the_cat->parent, TRUE, $delimiter);
}
echo $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_category()) {
echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after;
} elseif (x_is_product_tag()) {
echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after;
} elseif (is_search()) {
echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after;
} elseif (is_singular('post')) {
if (get_option('page_for_posts') == is_front_page()) {
echo $current_before . $page_title . $current_after;
} else {
echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
}
} elseif (x_is_portfolio()) {
echo $current_before . get_the_title() . $current_after;
} elseif (x_is_portfolio_item()) {
$link = x_get_parent_portfolio_link();
$title = x_get_parent_portfolio_title();
echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after;
} elseif (x_is_product()) {
echo $shop_link . $delimiter . $current_before . $page_title . $current_after;
} elseif (is_page() && !$post->post_parent) {
echo $current_before . $page_title . $current_after;
} elseif (is_page() && $post->post_parent) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs) - 1) {
echo $delimiter;
}
}
echo $delimiter . $current_before . $page_title . $current_after;
} elseif (is_tag()) {
echo $current_before . single_tag_title('', false) . $current_after;
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”';
} elseif (is_404()) {
echo $current_before . __('404 (Page Not Found)', '__x__') . $current_after;
} elseif (is_archive()) {
if (x_is_shop()) {
echo $current_before . $shop_title . $current_after;
} else {
echo $current_before . __('Archives ', '__x__') . $current_after;
}
}
if (get_query_var('paged')) {
echo ' <span class="current" style="white-space: nowrap;">(' . __('Page', '__x__') . ' ' . get_query_var('paged') . ')</span>';
}
echo '</div>';
}
}
}
}
示例14: get_header
// =============================================================================
// VIEWS/ICON/WOOCOMMERCE.PHP
// -----------------------------------------------------------------------------
// WooCommerce page output for Icon.
// =============================================================================
?>
<?php
get_header();
?>
<div class="x-main full" role="main">
<div class="x-container max width offset-top offset-bottom">
<?php
if (x_is_shop()) {
?>
<header class="entry-header shop">
<h1 class="entry-title"><?php
echo x_get_option('x_icon_shop_title');
?>
</h1>
</header>
<?php
}
?>
<?php
woocommerce_content();
?>