• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP woocommerce_page_title函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中woocommerce_page_title函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_page_title函数的具体用法?PHP woocommerce_page_title怎么用?PHP woocommerce_page_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了woocommerce_page_title函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: cpotheme_page_title

 function cpotheme_page_title()
 {
     global $post;
     if (isset($post->ID)) {
         $current_id = $post->ID;
     } else {
         $current_id = false;
     }
     $title_tag = function_exists('is_woocommerce') && is_woocommerce() && is_singular('product') ? 'span' : 'h1';
     echo '<' . $title_tag . ' class="pagetitle-title heading">';
     if (function_exists('is_woocommerce') && is_woocommerce()) {
         woocommerce_page_title();
     } elseif (is_category() || is_tag() || is_tax()) {
         echo single_tag_title('', true);
     } elseif (is_author()) {
         the_author();
     } elseif (is_date()) {
         _e('Archive', 'brilliance');
     } elseif (is_404()) {
         echo __('Page Not Found', 'brilliance');
     } elseif (is_search()) {
         echo __('Search Results for', 'brilliance') . ' "' . get_search_query() . '"';
     } else {
         echo get_the_title($current_id);
     }
     echo '</' . $title_tag . '>';
 }
开发者ID:neetudave,项目名称:heartfulness-uk,代码行数:27,代码来源:markup.php


示例2: ultra_display_woocommerce_page_title

 /**
  * Output the WooCommerce page titles to custom location.
  */
 function ultra_display_woocommerce_page_title()
 {
     if (is_singular('product')) {
         woocommerce_template_single_title();
     } else {
         echo '<h1 class="entry-title">';
         woocommerce_page_title();
         echo '</h1>';
     }
 }
开发者ID:selectSIFISO,项目名称:.comsite,代码行数:13,代码来源:woocommerce.php


示例3: square_theme_wrapper_start

function square_theme_wrapper_start()
{
    echo '<header class="sq-main-header">';
    echo '<div class="sq-container">';
    echo '<h1 class="sq-main-title">';
    woocommerce_page_title();
    echo '</h1>';
    do_action('sq_woocommerce_archive_description');
    echo '</div>';
    echo '</header>';
    echo '<div class="sq-container">';
    echo '<div id="primary">';
}
开发者ID:jgcopple,项目名称:drgaryschwantz,代码行数:13,代码来源:woo-functions.php


示例4: tokopress_shop_description

function tokopress_shop_description()
{
    $output = '';
    ob_start();
    if (of_get_option('tokopress_wc_hide_products_header')) {
        echo '<h1 class="page-title">';
        woocommerce_page_title();
        echo '</h1>';
    }
    do_action('woocommerce_archive_description');
    $output .= ob_get_clean();
    if ($output) {
        echo '<div class="shop_description">' . $output . '</div>';
    }
}
开发者ID:Artgorae,项目名称:wp-artgorae,代码行数:15,代码来源:frontend.php


示例5: get_title

 public function get_title()
 {
     $separator = $this->title_separator;
     $use_wp_title = $this->use_wp_title_function;
     // Disabling 'title-tag' feature.
     $activate_title_tag_back = false;
     if ($use_wp_title && get_theme_support('title-tag')) {
         remove_theme_support('title-tag');
         $activate_title_tag_back = true;
     }
     $q = $GLOBALS['wp_query'];
     if ($q->get('wc_query') && function_exists('woocommerce_page_title')) {
         if ($separator) {
             $separator = '';
         }
         $title = woocommerce_page_title(false);
     } else {
         $is_home = is_home();
         $is_front_page = is_front_page();
         if ($is_home || $is_front_page) {
             if ($is_home && $is_front_page) {
                 $title = get_bloginfo('name');
             } elseif ($is_home) {
                 $title = get_the_title(get_option('page_for_posts'));
             } elseif ($is_front_page) {
                 $title = get_the_title(get_option('page_on_front'));
             }
         } else {
             if ($use_wp_title) {
                 $title = wp_title($separator, false);
             } else {
                 $title = is_singular() ? get_the_title(get_queried_object()) : strip_tags(get_the_archive_title());
             }
         }
     }
     // Restoring 'title-tag' feature.
     if ($activate_title_tag_back) {
         // add_theme_support( 'title-tag' );
         $GLOBALS['_wp_theme_features']['title-tag'] = true;
     }
     if ($title) {
         if ($separator) {
             $title = substr($title, strlen($separator) + 1);
         }
         $title = trim($title);
     }
     return $title;
 }
开发者ID:j-kenneth,项目名称:Expeero,代码行数:48,代码来源:AtHeaderSection.php


示例6: store_single_custom_header

function store_single_custom_header()
{
    if (apply_filters('woocommerce_show_page_title', true)) {
        ?>
        <div class="header-title col-md-12">
            <span><?php 
        woocommerce_page_title();
        ?>
</span>
        </div>
    <?php 
    }
    ?>

    <div id="primary-mono" class="content-area <?php 
    do_action('store_primary-width');
    ?>
">
        <main id="main" class="site-main" role="main">
    <?php 
}
开发者ID:endelgs,项目名称:compraesperta,代码行数:21,代码来源:woocommerce.php


示例7: anaglyph_woo_page_title

    function anaglyph_woo_page_title()
    {
        global $anaglyph_config;
        if (apply_filters('woocommerce_show_page_title', true)) {
            ?>
			<!-- Page Title -->
			<section id="page-title">
				<div class="title">
					<?php 
            if (is_single()) {
                ?>
						<h1 class="reset-margin"><?php 
                the_title();
                ?>
</h1>
					<?php 
            } else {
                ?>
						<h1 class="reset-margin"><?php 
                woocommerce_page_title();
                ?>
</h1>
					<?php 
            }
            ?>
				</div>
				<?php 
            if (!empty($anaglyph_config['shopheader-image'])) {
                $simg = $anaglyph_config['shopheader-image'];
                echo '<img src="' . esc_url($simg['url']) . '" class="parallax-bg" alt="">';
            }
            ?>
	</section>
	<!-- end Page Title -->
	<?php 
        }
    }
开发者ID:junibrosas,项目名称:anaglyph,代码行数:37,代码来源:theme-woocommerce.php


示例8: dazzling_wrapper_start

function dazzling_wrapper_start() {
	echo '<div class="header-title" style="padding-top: 10px; padding-bottom: 10px;">';
	echo '<div class="container">';

	echo '<div id="primary" class="content-area col-sm-12 col-md-6">';
	echo '<h1 class="entry-title" style="display: inline-block">';
	
	global $current_user;

    $user_roles = $current_user->roles;
    $user_role = array_shift($user_roles);

	if(is_product()){
	the_title();
		if($user_role=="wholesale_customer"){
			echo " ".get_post_meta( get_the_ID(), 'pharmacies_slug', true );
		}
	}
	else if(is_shop()){
	
		if($user_role=="wholesale_customer"){
			echo "Pharmacy ";
		}
		woocommerce_page_title();
	}
	else{
		woocommerce_page_title();
	}
	
	echo  '</h1>';
	if(is_shop()){
		if($user_role=="wholesale_customer"){
			echo '<img style="float: right;" src="'.get_home_url().'/resources/uploads/2015/08/freeshipping_new_pharmacy.png"/>';
		}
		else{
			echo '<img style="float: right;" src="'.get_home_url().'/resources/uploads/2015/08/freeshipping_new.png"/>';
		}
	}
	echo '</div>';







	echo '<div id="primary" class="content-area col-sm-12 col-md-6">';
	if(is_shop()){
	$taxonomy     = 'product_cat';
	$orderby      = 'name';  
	$show_count   = 0;      // 1 for yes, 0 for no
	$pad_counts   = 0;      // 1 for yes, 0 for no
	$hierarchical = 1;      // 1 for yes, 0 for no  
	$title        = '';  
	$empty        = 0;
	$args = array(
	  'taxonomy'     => $taxonomy,
	  'orderby'      => $orderby,
	  'show_count'   => $show_count,
	  'pad_counts'   => $pad_counts,
	  'hierarchical' => $hierarchical,
	  'title_li'     => $title,
	  'hide_empty'   => $empty
	);
	echo "<span class='cat_nav'>";
	$all_categories = get_categories( $args );
	//print_r($all_categories);
	$x=1;
	foreach ($all_categories as $cat) {
		
		if($x ==1 ){
			if($cat->category_parent == 0) {
				echo "<a href='#products_categories_row_$cat->term_id'>".$cat->name."</a>";
			}
		}
		else{
			if($cat->category_parent == 0) {
				echo " | <a href='#products_categories_row_$cat->term_id'>".$cat->name."</a>";
			}
		}
		$x++;
	}

	echo "</span>";
}

else{
	echo '<img src="http://174.121.78.227/~kmxmarketing/resources/uploads/2015/08/freeshipping_new.png"/>';
}
	echo '</div></div></div>';
	echo '<div class="site-content container">';
	echo '<div id="primary" class="content-area col-sm-12 col-md-12">';
	echo '<main id="main" class="site-main" role="main">';
}
开发者ID:helloworld-digital,项目名称:katemorgan,代码行数:94,代码来源:woo-setup.php


示例9: dt_woocommerce_get_page_title

 /**
  * Wrap for woocommerce_page_title( false ).
  * 
  * @param  string $title
  * @return string
  */
 function dt_woocommerce_get_page_title($title = '')
 {
     return woocommerce_page_title(false);
 }
开发者ID:noman90rauf,项目名称:wp-content,代码行数:10,代码来源:mod-wc-template-functions.php


示例10: while

	<?php 
    while (have_posts()) {
        the_post();
        wc_get_template_part('content', 'product');
    }
    ?>

	<?php 
    $next_link = get_next_posts_link(__('More', 'woocommerce'), '');
    echo str_replace('<a ', '<a data-rel="post-list" ' . implode(' ', $attr) . ' class="button-more ' . esc_attr($load_more_class) . '" ', $next_link);
    ?>


<?php 
} else {
    $current_page_title = woocommerce_page_title(false);
    get_header('shop');
    list($has_sidebar, $sidebar_position, $sidebar_area) = xt_setup_dynamic_sidebar($shop_page_id);
    ?>

	<div class="row in-container">
						
		<!-- Main Content -->	
		<div class="small-12 medium-<?php 
    echo $has_sidebar ? '6' : '12';
    ?>
 large-<?php 
    echo $has_sidebar ? '8' : '12';
    ?>
 column">
开发者ID:venturepact,项目名称:blog,代码行数:30,代码来源:archive-product.php


示例11: get_header

 * @version     2.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $smof_data;
get_header($smof_data['ts_header_layout']);
$extra_class = "";
$page_column_class = ts_page_layout_columns_class($smof_data['ts_prod_cat_layout']);
$show_breadcrumb = get_post_meta(wc_get_page_id('shop'), 'ts_show_breadcrumb', true);
$show_page_title = apply_filters('woocommerce_show_page_title', true) && get_post_meta(wc_get_page_id('shop'), 'ts_show_page_title', true);
if ($show_breadcrumb && isset($smof_data['ts_breadcrumb_layout'])) {
    $extra_class = 'show_breadcrumb_' . $smof_data['ts_breadcrumb_layout'];
}
ts_breadcrumbs_title($show_breadcrumb, $show_page_title, woocommerce_page_title(false));
$show_top_content_widget_area = is_active_sidebar('product-category-top-content') && $smof_data['ts_prod_cat_top_content'];
?>
<div class="page-container <?php 
echo esc_attr($extra_class);
?>
">

	<!-- Left Sidebar -->
	<?php 
if ($page_column_class['left_sidebar']) {
    ?>
		<aside id="left-sidebar" class="ts-sidebar <?php 
    echo esc_attr($page_column_class['left_sidebar_class']);
    ?>
">
开发者ID:ericsoncardosoweb,项目名称:dallia,代码行数:31,代码来源:archive-product.php


示例12: extra_woocommerce_output_content_wrapper

function extra_woocommerce_output_content_wrapper()
{
    echo '
		<div id="main-content">
			<div class="container">
				<div id="content-area" class="clearfix">
					<div class="et_pb_row woocommerce-page-top">';
    if (!is_singular('product')) {
        echo '<h1 class="page-title">' . woocommerce_page_title(false) . '</h1>';
    }
    woocommerce_breadcrumb();
    echo '			</div>
					<div class="et_pb_extra_column_main">';
}
开发者ID:rthburke,项目名称:fltHub,代码行数:14,代码来源:woocommerce-support.php


示例13: dt_woocommerce_title_controller

/**
 * Title controller.
 *
 */
function dt_woocommerce_title_controller()
{
    $config = Presscore_Config::get_instance();
    $title_mode = $config->get('header_title');
    if ('disabled' != $title_mode) {
        $title_align = of_get_option('general-title_align', 'center');
        $title_classes = array('page-title');
        switch ($title_align) {
            case 'right':
                $title_classes[] = 'title-right';
                break;
            case 'left':
                $title_classes[] = 'title-left';
                break;
            default:
                $title_classes[] = 'title-center';
        }
        $before_title = '<div class="' . esc_attr(implode(' ', $title_classes)) . '"><div class="wf-wrap"><div class="wf-table">';
        $after_title = '</div></div></div>';
        $breadcrumbs = apply_filters('dt_sanitize_flag', of_get_option('general-show_breadcrumbs', 1));
        echo $before_title;
        if ('right' == $title_align) {
            if ($breadcrumbs) {
                echo presscore_get_breadcrumbs();
            }
            echo '<div class="wf-td"><h1>';
            woocommerce_page_title();
            echo '</h1></div>';
        } else {
            echo '<div class="wf-td"><h1>';
            woocommerce_page_title();
            echo '</h1></div>';
            if ($breadcrumbs) {
                echo presscore_get_breadcrumbs();
            }
        }
        echo $after_title;
    }
}
开发者ID:scottnkerr,项目名称:eeco,代码行数:43,代码来源:mod-woocommerce.php


示例14: miss_woocommerce_content

function miss_woocommerce_content()
{
    if (is_singular('product')) {
        while (have_posts()) {
            the_post();
            woocommerce_get_template_part('content', 'single-product');
        }
    } else {
        ?>

		<?php 
        if (apply_filters('woocommerce_show_page_title', true)) {
            ?>
            <div class="bread-container">
                <div class="bread-wrapper">
                    <div class="blog-title"><?php 
            woocommerce_page_title();
            ?>
</div>
                    <?php 
            dimox_breadcrumbs();
            ?>
                </div>
            </div>

		<?php 
        }
        ?>

		<?php 
        do_action('woocommerce_archive_description');
        ?>

		<?php 
        if (have_posts()) {
            ?>

			<?php 
            do_action('woocommerce_before_shop_loop');
            ?>

			<?php 
            woocommerce_product_loop_start();
            ?>

				<?php 
            woocommerce_product_subcategories();
            ?>

				<?php 
            while (have_posts()) {
                the_post();
                ?>

					<?php 
                woocommerce_get_template_part('content', 'product');
                ?>

				<?php 
            }
            // end of the loop.
            ?>

			<?php 
            woocommerce_product_loop_end();
            ?>

			<?php 
            do_action('woocommerce_after_shop_loop');
            ?>

		<?php 
        } elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) {
            ?>

			<?php 
            woocommerce_get_template('loop/no-products-found.php');
            ?>

		<?php 
        }
    }
}
开发者ID:schiz,项目名称:scrollax,代码行数:83,代码来源:theme.php


示例15: dh_page_title

function dh_page_title($echo = true)
{
    $title = "";
    if (is_category()) {
        $title = single_cat_title('', false);
    } elseif (is_day()) {
        $title = __('Archive for date:', DH_DOMAIN) . " " . get_the_time('F jS, Y');
    } elseif (is_month()) {
        $title = __('Archive for month:', DH_DOMAIN) . " " . get_the_time('F, Y');
    } elseif (is_year()) {
        $title = __('Archive for year:', DH_DOMAIN) . " " . get_the_time('Y');
    } elseif (is_search()) {
        global $wp_query;
        if (!empty($wp_query->found_posts)) {
            if ($wp_query->found_posts > 1) {
                $title = $wp_query->found_posts . " " . __('search results for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>';
            } else {
                $title = $wp_query->found_posts . " " . __('search result for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>';
            }
        } else {
            if (!empty($_GET['s'])) {
                $title = __('Search results for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>';
            } else {
                $title = __('To search the site please enter a valid term', DH_DOMAIN);
            }
        }
    } elseif (is_author()) {
        $curauth = get_query_var('author_name') ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
        if (isset($curauth->nickname)) {
            $title = $curauth->nickname;
        }
    } elseif (is_tag()) {
        $title = single_tag_title('', false);
    } elseif (is_tax()) {
        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
        $title = $term->name;
    } elseif (is_front_page() && !is_home()) {
        $title = get_the_title(get_option('page_on_front'));
    } elseif (is_home() && !is_front_page()) {
        $title = get_the_title(get_option('page_for_posts'));
    } elseif (is_404()) {
        $title = __('404 - Page not found', DH_DOMAIN);
    } else {
        $title = get_the_title();
    }
    if (isset($_GET['paged']) && !empty($_GET['paged'])) {
        $title .= " (" . __('Page', DH_DOMAIN) . " " . $_GET['paged'] . ")";
    }
    if (defined('WOOCOMMERCE_VERSION') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
        // 		if( ! is_product() ) {
        // 			$title = woocommerce_page_title( false );
        // 		}else{
        // 			$title =
        // 		}
        $title = woocommerce_page_title(false);
    }
    if (is_post_type_archive('portfolio')) {
        $title = esc_html(dh_get_theme_option('portfolio-archive-title', __('My Portfolio', DH_DOMAIN)));
    }
    if ($echo) {
        echo dhecho($title);
    } else {
        return $title;
    }
}
开发者ID:mysia84,项目名称:mnassalska,代码行数:65,代码来源:functions.php


示例16: getPageTitle

 /**
  * Page title
  * 
  * @since 1.0.0
  */
 public static function getPageTitle()
 {
     global $tb_meta;
     if (!is_archive()) {
         /* page. */
         if (is_page()) {
             /* custom title. */
             if (!empty($tb_meta->_tb_page_title_text) && $tb_meta->_tb_page_title_text) {
                 echo esc_attr($tb_meta->_tb_page_title_text);
             } else {
                 the_title();
             }
             /* blog */
         } elseif (is_front_page()) {
             _e('Blog', 'leonard');
             /* search */
         } elseif (is_search()) {
             printf(__('Search Results for: %s', 'leonard'), '<span>' . get_search_query() . '</span>');
             /* 404 */
         } elseif (is_404()) {
             _e('404', 'leonard');
             /* other */
         } else {
             the_title();
         }
     } else {
         /* category. */
         if (is_category()) {
             single_cat_title();
         } elseif (is_tag()) {
             /* tag. */
             single_tag_title();
             /* author. */
         } elseif (is_author()) {
             printf(__('Author: %s', 'leonard'), '<span class="vcard">' . get_the_author() . '</span>');
             /* date */
         } elseif (is_day()) {
             printf(__('Day: %s', 'leonard'), '<span>' . get_the_date() . '</span>');
         } elseif (is_month()) {
             printf(__('Month: %s', 'leonard'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'leonard')) . '</span>');
         } elseif (is_year()) {
             printf(__('Year: %s', 'leonard'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'leonard')) . '</span>');
             /* post format */
         } elseif (is_tax('post_format', 'post-format-aside')) {
             _e('Asides', 'leonard');
         } elseif (is_tax('post_format', 'post-format-gallery')) {
             _e('Galleries', 'leonard');
         } elseif (is_tax('post_format', 'post-format-image')) {
             _e('Images', 'leonard');
         } elseif (is_tax('post_format', 'post-format-video')) {
             _e('Videos', 'leonard');
         } elseif (is_tax('post_format', 'post-format-quote')) {
             _e('Quotes', 'leonard');
         } elseif (is_tax('post_format', 'post-format-link')) {
             _e('Links', 'leonard');
         } elseif (is_tax('post_format', 'post-format-status')) {
             _e('Statuses', 'leonard');
         } elseif (is_tax('post_format', 'post-format-audio')) {
             _e('Audios', 'leonard');
         } elseif (is_tax('post_format', 'post-format-chat')) {
             _e('Chats', 'leonard');
             /* woocommerce */
         } elseif (class_exists('Woocommerce') && is_woocommerce()) {
             woocommerce_page_title();
         } else {
             /* other */
             the_title();
         }
     }
 }
开发者ID:BearsTheme,项目名称:leonard,代码行数:75,代码来源:base.class.php


示例17: avada_current_page_title_bar

function avada_current_page_title_bar($post_id)
{
    global $smof_data;
    ob_start();
    if ($smof_data['breadcrumb']) {
        if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') {
            if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) {
                woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => ''));
            } else {
                if (class_exists('bbPress') && is_bbpress()) {
                    bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada')));
                } else {
                    themefusion_breadcrumb();
                }
            }
        } else {
            get_search_form();
        }
    }
    $secondary_content = ob_get_contents();
    ob_get_clean();
    $title = '';
    $subtitle = '';
    if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
        $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
    }
    if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
        $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
    }
    if (!$title) {
        $title = get_the_title();
        if (is_home()) {
            $title = $smof_data['blog_title'];
        }
        if (is_search()) {
            $title = __('Search results for:', 'Avada') . get_search_query();
        }
        if (is_404()) {
            $title = __('Error 404 Page', 'Avada');
        }
        if (is_archive()) {
            if (is_day()) {
                $title = __('Daily Archives:', 'Avada') . '<span> ' . get_the_date() . '</span>';
            } else {
                if (is_month()) {
                    $title = __('Monthly Archives:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
                } elseif (is_year()) {
                    $title = __('Yearly Archives:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
                } elseif (is_author()) {
                    $curauth = isset($_GET['author_name']) ? get_user_by('slug', $_GET['author_name']) : get_user_by('id', get_the_author_meta('ID'));
                    $title = $curauth->nickname;
                } else {
                    $title = single_cat_title('', false);
                }
            }
        }
        if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
            if (!is_product()) {
                $title = woocommerce_page_title(false);
            }
        }
    }
    if (!$subtitle) {
        if (is_home() && !is_front_page()) {
            $subtitle = $smof_data['blog_subtitle'];
        }
    }
    if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
        if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) == 'default') {
            if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') {
                $title = '';
                $subtitle = '';
            }
            avada_page_title_bar($title, $subtitle, $secondary_content);
        }
    } else {
        if ($smof_data['page_title_bar']) {
            avada_page_title_bar($title, $subtitle, $secondary_content);
        }
    }
}
开发者ID:IDOAgency,项目名称:PAHClinic,代码行数:81,代码来源:custom_functions.php


示例18: breadcrumbs

 public static function breadcrumbs()
 {
     global $post, $pagename;
     /* ================ Settings ================ */
     $delimiter = ' / ';
     // separator
     $sign = null;
     // text before breadcrumbs
     $home = __('Home', 'grandway');
     // homepage name
     $showCurrent = 1;
     // 1 - show current page, 0 - don't show
     $before = null;
     // before crumb tag
     $after = null;
     // after crumb tag
     /* ============== Settings END ============== */
     $homeLink = home_url();
     $get_post_type = get_post_type();
     // WooCommerce
     $woo = PhoenixTeam_Utils::dep_exists('woocommerce');
     if ($woo) {
         if (function_exists('is_shop')) {
             $woo_shop = is_shop();
             ob_start();
             woocommerce_page_title();
             $woo_title = ob_get_clean();
         }
     }
     echo '<div class="col-lg-6 pull-right"><div class="page-in-bread">';
     echo wp_kses_post($sign) . '<a href="' . esc_url($homeLink) . '" title="' . __('Home Page', 'grandway') . '">' . esc_html($home) . '</a> ' . esc_html($delimiter) . ' ';
     $posts_page = self::check_posts_page();
     if ($posts_page && $pagename == $posts_page->post_name) {
         if (get_query_var('paged')) {
             $this_permalink = get_permalink($posts_page->ID);
             echo esc_html($before) . '<a href="' . esc_url($this_permalink) . '" title="' . esc_attr($posts_page->post_title) . '">' . esc_html($posts_page->post_title) . '</a>' . esc_html($after);
         } else {
             echo esc_html($before) . esc_html($posts_page->post_title) . esc_html($after);
         }
     }
     if (is_category()) {
         $thisCat = get_category(get_query_var('cat'), false);
         if ($thisCat->parent != 0) {
             echo '' . get_category_parents($thisCat->parent, TRUE, ' ' . esc_html($delimiter) . ' ') . '';
         }
         echo esc_html($before) . single_cat_title('', false) . esc_html($after);
     } elseif (is_search()) {
         echo esc_html($before) . __('Search for: ', 'grandway') . ' "' . get_search_query() . '"' . esc_html($after);
     } elseif (is_day()) {
         echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . esc_html($delimiter) . ' ';
         echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . esc_html($delimiter) . ' ';
         echo esc_html($before) . get_the_time('d') . esc_html($after);
     } elseif (is_month()) {
         echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . esc_html($delimiter) . ' ';
         echo esc_html($before) . get_the_time('F') . esc_html($after);
     } elseif (is_year()) {
         echo esc_html($before) . get_the_time('Y') . esc_html($after);
     } elseif (is_single() && !is_attachment()) {
         if ($get_post_type != 'post') {
             $post_type = get_post_type_object($get_post_type);
             $slug = $post_type->rewrite;
             echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/" onclick="jQuery(function($){event.preventDefault(); window.history.back();});">' . $post_type->labels->name . '</a>';
             if ($showCurrent == 1) {
                 echo ' ' . esc_html($delimiter) . ' ' . esc_html($before) . esc_html(get_the_title()) . esc_html($after) . "\n";
             }
         } else {
             $cat = get_the_category();
             $cat = $cat[0];
             $cats = get_category_parents($cat, TRUE, ' ' . esc_html($delimiter) . ' ');
             if ($showCurrent == 0) {
                 $cats = preg_replace("#^(.+)\\sesc_html({$delimiter})\\s\$#", "\$1", $cats);
             }
             echo wp_kses_post($cats);
             if ($showCurrent == 1) {
                 echo esc_html($before) . esc_html(get_the_title()) . esc_html($after);
             }
         }
         // WooCommerce
     } elseif ($woo && $woo_shop) {
         echo esc_html($before) . esc_html($woo_title) . esc_html($after);
         // Othec CPTs
     } elseif (!is_single() && !is_page() && $get_post_type != 'post' && !is_404()) {
         $post_type = get_post_type_object($get_post_type);
         echo esc_html($before) . esc_html($post_type->labels->singular_name) . "/" . esc_html($after);
     } elseif (is_attachment()) {
         $parent = get_post($post->post_parent);
         $cat = get_the_category($parent->ID);
         if ($cat) {
             $cat = $cat[0];
             echo '' . get_category_parents($cat, TRUE, ' ' . esc_html($delimiter) . ' ') . '';
         }
         echo '<a href="' . esc_url(get_permalink($parent)) . '">' . esc_html($parent->post_title) . '</a>';
         if ($showCurrent == 1) {
             echo ' ' . esc_html($delimiter) . ' ' . esc_html($before) . esc_html(get_the_title()) . esc_html($after);
         }
     } elseif (is_page() && !$post->post_parent) {
         if (get_query_var('paged')) {
             if ($showCurrent == 1) {
                 echo esc_html($before) . '<a href="' . esc_url(get_permalink($post->ID)) . '">' . esc_html(get_the_title($post->ID)) . '</a>' . esc_html($after);
             }
//.........这里部分代码省略.........
开发者ID:WillLin,项目名称:CS-SC-Front-End,代码行数:101,代码来源:utils.php


示例19: sf_page_heading


//.........这里部分代码省略.........
                    <div class="tabbed-heading-wrap">
                    <?php 
                }
                ?>

                    <div class="heading-text container" data-textalign="<?php 
                echo esc_attr($page_title_text_align);
                ?>
">
                        <?php 
                if (sf_woocommerce_activated() && is_woocommerce()) {
                    ?>

                            <?php 
                    if (is_product()) {
                        ?>

                                <h1 class="entry-title" <?php 
                        echo $article_heading_text;
                        ?>
><?php 
                        echo $page_title;
                        ?>
</h1>

                            <?php 
                    } else {
                        ?>

                                <h1 class="entry-title" <?php 
                        echo $article_heading_text;
                        ?>
><?php 
                        woocommerce_page_title();
                        ?>
</h1>

                            <?php 
                    }
                    ?>

                        <?php 
                } else {
                    ?>

                            <h1 class="entry-title"><?php 
                    echo $page_title;
                    ?>
</h1>

                        <?php 
                }
                ?>

                        <?php 
                if ($page_subtitle) {
                    ?>
                            <h3><?php 
                    echo $page_subtitle;
                    ?>
</h3>
                        <?php 
                }
                ?>

						<?php 
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:67,代码来源:sf-page-heading.php


示例20: mk_page_title

 function mk_page_title()
 {
     global $mk_options;
     $post_id = global_get_post_id();
     if (is_singular('product') && $mk_options['woocommerce_single_product_title'] == 'false') {
         return false;
     }
     if (is_singular('employees')) {
         return false;
     }
     if ($post_id && (get_post_meta($post_id, '_template', true) == 'no-title' || get_post_meta($post_id, '_template', true) == 'no-header-title' || get_post_meta($post_id, '_template', true) == 'no-header-title-footer' || get_post_meta($post_id, '_template', true) == 'no-footer-title')) {
         return false;
     }
     if (global_get_post_id() && get_post_meta($post_id, '_enable_slidehsow', true) == 'true' || is_404()) {
         return false;
     }
     $align = $title = $subtitle = $shadow_css = '';
     if ($post_id) {
         $custom_page_title = get_post_meta($post_id, '_custom_page_title', true);
         if (!empty($custom_page_title)) {
             $title = $custom_page_title;
         } else {
             $title = get_the_title($post_id);
         }
         $subtitle = get_post_meta($post_id, '_page_introduce_subtitle', true);
         $align = get_post_meta($post_id, '_introduce_align', true);
     }
     /* Loads Archive Page Headings */
     if (is_archive()) {
         $title = $mk_options['archive_page_title'];
         if (is_category()) {
             $subtitle = sprintf(__('Category Archive for: "%s"', 'mk_framework'), single_cat_title('', false));
         } elseif (is_tag()) {
             $subtitle = sprintf(__('Tag Archives for: "%s"', 'mk_framework'), single_tag_title('', false));
         } elseif (is_day()) {
             $subtitle = sprintf(__('Daily Archive for: "%s"', 'mk_framework'), get_the_time('F jS, Y'));
         } elseif (is_month()) {
             $subtitle = sprintf(__('Monthly Archive for: "%s"', 'mk_framework'), get_the_time('F, Y'));
         } elseif (is_year()) {
             $subtitle = sprintf(__('Yearly Archive for: "%s"', 'mk_framework'), get_the_time('Y'));
         } elseif (is_author()) {
             if (get_query_var('author_name')) {
                 $curauth = get_user_by('slug', get_query_var('author_name'));
             } else {
                 $curauth = get_userdata(get_query_var('author'));
             }
             $subtitle = sprintf(__('Author Archive for: "%s"'), $curauth->nickname);
         } elseif (is_tax()) {
             $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
             $subtitle = sprintf(__('Archives for: "%s"', 'mk_framework'), $term->name);
         }
         if ($mk_options['archive_disable_subtitle'] == 'false') {
             $subtitle = '';
         }
     }
     if (function_exists('is_bbpress') && is_bbpress()) {
         if (bbp_is_forum_archive()) {
             $title = bbp_get_forum_archive_title();
         } elseif (bbp_is_topic_archive()) {
             $title = bbp_get_topic_archive_title();
         } elseif (bbp_is_single_view()) {
             $title = bbp_get_view_title();
         } elseif (bbp_is_single_forum()) {
             $forum_id = get_queried_object_id();
             $forum_parent_id = bbp_get_forum_parent_id($forum_id);
             //if ( 0 !== $forum_parent_id )
             //$title = breadcrumbs_plus_get_parents( $forum_parent_id );
             $title = bbp_get_forum_title($forum_id);
         } elseif (bbp_is_single_topic()) {
             $topic_id = get_queried_object_id();
             $title = bbp_get_topic_title($topic_id);
         } elseif (bbp_is_single_user() || bbp_is_single_user_edit()) {
             $title = bbp_get_displayed_user_field('display_name');
         }
     }
     if (function_exists('is_woocommerce') && is_woocommerce() && !empty($post_id)) {
         ob_start();
         woocommerce_page_title();
         $title = ob_get_clean();
     }
     if (function_exists('is_woocommerce') && is_woocommerce()) {
         $title = __('Shop', 'mk_framework');
         if (is_archive() || is_singular('produc 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP woocommerce_placeholder_img函数代码示例发布时间:2022-05-23
下一篇:
PHP woocommerce_order_review函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap