当前位置: 首页>>代码示例>>PHP>>正文


PHP woocommerce_breadcrumb函数代码示例

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


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

示例1: pbosfc_woocommerce_breadcrumb

/**
 * Breadcrumb always in shop (products, categories, etc.)
 * and on pages/posts only if option is ON.
 */
function pbosfc_woocommerce_breadcrumb($args = array())
{
    $display = true;
    if ('page' === get_post_type()) {
        $display = pbosfc_get_option('page_breadcrumb');
    } elseif ('post' === get_post_type()) {
        $display = pbosfc_get_option('post_breadcrumb');
    } elseif ('product' === get_post_type()) {
        $display = pbosfc_get_option('product_breadcrumb');
    }
    if ($display) {
        woocommerce_breadcrumb($args);
    }
}
开发者ID:boguslawski-piotr,项目名称:pbo-storefront-compact,代码行数:18,代码来源:template-tags.php

示例2: wpv_woo_breadcrumb_func

 /**
  * Outputs the default WooCommerce breadcrumb.
  * This is meant for single-product pages only.
  * @access public
  * @return void
  */
 public function wpv_woo_breadcrumb_func()
 {
     global $post, $woocommerce;
     ob_start();
     if (is_object($woocommerce)) {
         //WooCommerce plugin activated
         //Get products
         $product = $this->wcviews_setup_product_data($post);
         if (isset($product) && is_product()) {
             //Check if product_type is set
             if (isset($product->product_type)) {
                 //Set, check if defined
                 $product_type = $product->product_type;
                 if (!empty($product_type)) {
                     //Defined
                     //Simple or variable products
                     if (function_exists('woocommerce_breadcrumb')) {
                         //Call WooCommerce core public function on outputting WooCommerce Breadcrumb
                         woocommerce_breadcrumb();
                     }
                     return ob_get_clean();
                 }
             }
         }
     }
 }
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:32,代码来源:Class_WooCommerce_Views.php

示例3: dt_woocommerce_replace_theme_breadcrumbs

/**
 * New breadcrumbs.
 *
 */
function dt_woocommerce_replace_theme_breadcrumbs($html = '')
{
    if (!$html) {
        ob_start();
        woocommerce_breadcrumb();
        $html = ob_get_clean();
        $html = apply_filters('presscore_get_breadcrumbs', $html);
    }
    return $html;
}
开发者ID:scottnkerr,项目名称:eeco,代码行数:14,代码来源:mod-woocommerce.php

示例4: array

        </div>
        </div>
        </div>
        </div>
        <!--   End subheader wrapper -->
				<!-- Mainbody, breadcrumbs -->
                <?php 
if ($usebreadcrumb) {
    ?>
				<div id="dp-breadcrumb-fontsize">
                <div class="dp-page pad10">
					<?php 
    $breadcrumbsargs = array('delimiter' => '&nbsp; → &nbsp;');
    ?>
					<?php 
    woocommerce_breadcrumb($breadcrumbsargs);
    ?>
                </div>
				</div>
                <?php 
}
?>
<div class="clearboth"></div>
<section class="dp-page-wrap<?php 
echo $addpageclass;
?>
">
               

	<section id="dp-mainbody-columns">			
			<section>
开发者ID:Karpec,项目名称:geo-mac,代码行数:31,代码来源:before-woocommerce.php

示例5: wp_reset_query

					<?php 
            }
        }
    }
    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 -->
开发者ID:rafaelfranco,项目名称:gruporota_portal,代码行数:30,代码来源:title.php

示例6: the_title

        // Title
        if (is_product()) {
            echo '<h2 class="title">';
            if (mfn_opts_get('shop-product-title')) {
                the_title();
            } else {
                woocommerce_page_title();
            }
            echo '</h2>';
        } else {
            echo '<h1 class="title">';
            woocommerce_page_title();
            echo '</h1>';
        }
        // Breadcrumbs
        if ($breadcrumbs_show) {
            $home = mfn_opts_get('translate') ? mfn_opts_get('translate-home', 'Home') : __('Home', 'betheme');
            $woo_crumbs_args = apply_filters('woocommerce_breadcrumb_defaults', array('delimiter' => false, 'wrap_before' => '<ul class="breadcrumbs woocommerce-breadcrumb">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '<span><i class="icon-right-open"></i></span></li>', 'home' => $home));
            woocommerce_breadcrumb($woo_crumbs_args);
        }
        echo '</div>';
        echo '</div>';
        echo '</div>';
    }
}
?>
			
		</div>
		
		<?php 
do_action('mfn_hook_content_before');
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:31,代码来源:header-shop.php

示例7: dynamo_woocommerce_breadcrumb

function dynamo_woocommerce_breadcrumb()
{
    woocommerce_breadcrumb(array('delimiter' => '', 'wrap_before' => '<div class="dp-woocommerce-breadcrumbs">', 'wrap_after' => '</div>', 'before' => '<span>', 'after' => '</span>'));
}
开发者ID:Karpec,项目名称:geo-mac,代码行数:4,代码来源:woocommerce-functions.php

示例8: yit_single_product_title_bar

function yit_single_product_title_bar()
{
    if (function_exists('WC')) {
        if (!is_product()) {
            return;
        }
        global $product;
        $args = array('delimiter' => ' > ');
        echo '<div id="title_bar" class="clearfix title_bar_single_product">';
        echo '<div class="container">';
        echo '<div class="row">';
        echo '<div class="col-sm-12">';
        echo '<h2>' . $product->get_title() . '</h2>';
        woocommerce_breadcrumb($args);
        wc_get_template('single-product/nav-links.php');
        echo '</div>';
        echo '</div>';
        echo '</div>';
        echo '</div>';
    }
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:21,代码来源:woocommerce.php

示例9: single_term_title

    <?php 
    echo single_term_title("", false);
    ?>
  <?php 
} else {
    ?>
  <?php 
    $shop_page = get_post(woocommerce_get_page_id('shop'));
    echo apply_filters('the_title', ($shop_page_title = get_option('woocommerce_shop_page_title')) ? $shop_page_title : $shop_page->post_title);
}
?>
</h2>

        <?php 
//
woocommerce_breadcrumb(array('delimiter' => ' ', 'wrap_before' => '<nav id="breadcrumbs"><ul><li>You are here: </li>', 'wrap_after' => '</ul></nav>', 'before' => '<li class="current_element">', 'after' => '</li>', 'home' => null));
?>
         <div id="bolded-line"></div>
       </div>
       <!-- Page Title / End -->
     </div>
   </div>
   <!-- 960 Container / End -->
   <?php 
/**
 * woocommerce_before_main_content hook
 *
 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
 * @hooked woocommerce_breadcrumb - 20
 */
do_action('woocommerce_before_main_content');
开发者ID:ElectricEasel,项目名称:reflection,代码行数:31,代码来源:single-product.php

示例10: ocin_lite_single_product_wrap_start_summary

/**
 * HTML wrap start for Single page summary
 */
function ocin_lite_single_product_wrap_start_summary()
{
    ?>
	<div class="summary-top">
		<?php 
    woocommerce_breadcrumb();
    ?>
		<?php 
    woocommerce_template_single_rating();
    ?>
		<div class="clearfix"></div>
	</div><!-- /summary-top -->
	<div class="entry">
	<?php 
}
开发者ID:nicoandrade,项目名称:Ocin-Lite,代码行数:18,代码来源:woocommerce_support.php

示例11: cmo_breadcrumb

function cmo_breadcrumb()
{
    if (class_exists('Woocommerce') && is_woocommerce()) {
        woocommerce_breadcrumb(array('delimiter' => '', 'wrap_before' => '<ul class="cmo-breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'home' => __('Home', 'cumulo')));
        return;
    }
    if (function_exists("is_bbpress") && is_bbpress()) {
        bbp_breadcrumb(array('before' => '<ul class="cmo-breadcrumbs">', 'after' => '</ul>', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'sep' => '', 'pad_sep' => 0, 'sep_before' => '', 'sep_after' => '', 'current_before' => '', 'current_after' => ''));
        return;
    }
    global $post;
    echo '<ul class="cmo-breadcrumbs">';
    if (!is_front_page()) {
        echo '<li><a href="';
        echo home_url();
        echo '">' . __('Home', 'cumulo') . "</a></li>";
        // echo '"><i class="fa fa-home"></i></a></li>';
    }
    $params['link_none'] = '';
    $separator = '';
    if (is_category() && !is_singular('cmo_portfolio')) {
        $category = get_the_category();
        $ID = $category[0]->cat_ID;
        echo is_wp_error($cat_parents = get_category_parents($ID, TRUE, '', FALSE)) ? '' : '<li>' . $cat_parents . '</li>';
    }
    if (is_singular('cmo_portfolio')) {
        echo '<li><a href="' . site_url('portfolio-items') . '">' . esc_html__('Portfolio', 'cumulo') . '</a></li>';
        echo get_the_term_list($post->ID, 'portfolio_category', '<li>', ',&nbsp;', '</li>');
        echo '<li>' . get_the_title() . '</li>';
    }
    if (function_exists("is_epl_post") && is_epl_post() && !is_epl_post_archive()) {
        echo '<li><a href="' . site_url('property') . '">' . esc_html__('Properties', 'cumulo') . '</a></li>';
    }
    if (is_singular('event')) {
        $terms = get_the_term_list($post->ID, 'event-categories', '<li>', ',&nbsp;', '</li>');
        if (!is_wp_error($terms)) {
            echo get_the_term_list($post->ID, 'event-categories', '<li>', ',&nbsp;', '</li>');
        }
        echo '<li>' . get_the_title() . '</li>';
    }
    if (is_tax()) {
        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
        $link = get_term_link($term);
        if (is_wp_error($link)) {
            echo sprintf('<li>%s</li>', $term->name);
        } else {
            echo sprintf('<li><a href="%s" title="%s">%s</a></li>', $link, $term->name, $term->name);
        }
    }
    if (is_home()) {
        echo '<li>' . '' . '</li>';
        ///$smof_data['blog_page_title']
    }
    if (is_page() && !is_front_page()) {
        $parents = array();
        $parent_id = $post->post_parent;
        while ($parent_id) {
            $page = get_page($parent_id);
            if ($params["link_none"]) {
                $parents[] = get_the_title($page->ID);
            } else {
                $parents[] = '<li><a href="' . get_permalink($page->ID) . '" title="' . get_the_title($page->ID) . '">' . get_the_title($page->ID) . '</a></li>' . $separator;
            }
            $parent_id = $page->post_parent;
        }
        $parents = array_reverse($parents);
        echo join('', $parents);
        echo '<li>' . get_the_title() . '</li>';
    }
    if (is_single() && !is_singular('cmo_portfolio') && !is_singular('tribe_events') && !is_singular('event') && !is_singular('wpfc_sermon')) {
        $categories_1 = get_the_category($post->ID);
        if ($categories_1) {
            foreach ($categories_1 as $cat_1) {
                $cat_1_ids[] = $cat_1->term_id;
            }
            $cat_1_line = implode(',', $cat_1_ids);
        }
        if (isset($cat_1_line) && $cat_1_line) {
            $categories = get_categories(array('include' => $cat_1_line, 'orderby' => 'id'));
            if ($categories) {
                echo '<li>';
                $cats = '';
                foreach ($categories as $cat) {
                    if ($cats != '') {
                        $cats .= ', ';
                    }
                    $cats .= '<a href="' . get_category_link($cat->term_id) . '" title="' . $cat->name . '">' . $cat->name . '</a>';
                }
                echo $cats;
                echo '</li>';
            }
        }
        echo '<li>' . get_the_title() . '</li>';
    }
    if (is_tag()) {
        echo '<li>' . "Tag: " . single_tag_title('', FALSE) . '</li>';
    }
    if (is_search()) {
        echo '<li>' . __("Search", 'cumulo') . '</li>';
    }
//.........这里部分代码省略.........
开发者ID:supahseppe,项目名称:ashley-travel,代码行数:101,代码来源:breadcrumb.php

示例12: memberlite_page_title

function memberlite_page_title()
{
    global $post;
    //capture output
    ob_start();
    //figure out page title
    if (function_exists('is_woocommerce') && is_woocommerce()) {
        woocommerce_breadcrumb();
        ?>
		<h1 class="page-title">
		<?php 
        if (is_shop()) {
            echo get_the_title(get_option('woocommerce_shop_page_id'));
        } elseif (is_archive()) {
            single_cat_title();
        } else {
            the_title();
        }
        ?>
		</h1>
			<?php 
        // Show an optional term description.
        $term_description = woocommerce_product_archive_description();
        if (!empty($term_description)) {
            printf('<div class="taxonomy-description">%s</div>', $term_description);
        }
        woocommerce_taxonomy_archive_description();
    } elseif (is_author() || is_tag() || is_archive()) {
        ?>
			<h1 class="page-title">
			<?php 
        if (is_category()) {
            single_cat_title();
        } elseif (is_tag()) {
            $current_tag = single_tag_title("", false);
            printf(__('Posts Tagged: %s', 'memberlite'), '<span>' . $current_tag . '</span>');
        } elseif (is_author()) {
            printf(__('Author: %s', 'memberlite'), '<span class="vcard">' . get_the_author() . '</span>');
        } elseif (is_day()) {
            printf(__('Day: %s', 'memberlite'), '<span>' . get_the_date() . '</span>');
        } elseif (is_month()) {
            printf(__('Month: %s', 'memberlite'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'memberlite')) . '</span>');
        } elseif (is_year()) {
            printf(__('Year: %s', 'memberlite'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'memberlite')) . '</span>');
        } elseif (is_tax('post_format', 'post-format-aside')) {
            _e('Asides', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-gallery')) {
            _e('Galleries', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-image')) {
            _e('Images', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-video')) {
            _e('Videos', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-quote')) {
            _e('Quotes', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-link')) {
            _e('Links', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-status')) {
            _e('Statuses', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-audio')) {
            _e('Audios', 'memberlite');
        } elseif (is_tax('post_format', 'post-format-chat')) {
            _e('Chats', 'memberlite');
        } elseif (bbp_is_forum_archive()) {
            _e('Forums', 'memberlite');
        } else {
            _e('Archives', 'memberlite');
        }
        ?>
		</h1>
		<?php 
        // Show an optional term description.
        $term_description = term_description();
        if (!empty($term_description)) {
            printf('<div class="taxonomy-description">%s</div>', $term_description);
        }
    } elseif (is_search()) {
        ?>
		<h1 class="page-title">
			<?php 
        printf(__('Search Results for: %s', 'memberlite'), '<span>' . get_search_query() . '</span>');
        ?>
		</h1>
		<?php 
    } elseif (is_singular('post')) {
        $author_id = $post->post_author;
        ?>
		<div class="masthead-post-byline">
			<div class="post_author_avatar"><?php 
        echo get_avatar($author_id, 80);
        ?>
</div>
			<?php 
        the_title('<h1 class="entry-title">', '</h1>');
        ?>
			<p class="entry-meta">
				<?php 
        memberlite_posted_on($post);
        ?>
			</p><!-- .entry-meta -->
		</div>
//.........这里部分代码省略.........
开发者ID:greathmaster,项目名称:memberlite,代码行数:101,代码来源:extras.php

示例13: dt_woocommerce_replace_theme_breadcrumbs

 /**
  * Breadcrumbs filter
  * 
  * @param  string $html
  * @param  array  $args
  * @return string
  */
 function dt_woocommerce_replace_theme_breadcrumbs($html = '', $args = array())
 {
     if (!$html) {
         ob_start();
         woocommerce_breadcrumb(array('delimiter' => '', 'wrap_before' => '<div class="assistive-text"></div><ol' . $args['listAttr'] . ' xmlns:v="http://rdf.data-vocabulary.org/#">', 'wrap_after' => '</ol>', 'before' => '<li typeof="v:Breadcrumb">', 'after' => '</li>', 'home' => __('Home', 'the7mk2')));
         $html = ob_get_clean();
         $html = apply_filters('presscore_get_breadcrumbs', $args['beforeBreadcrumbs'] . $html . $args['afterBreadcrumbs']);
     }
     return $html;
 }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:17,代码来源:mod-wc-template-functions.php

示例14: 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

示例15: get_header

<?php

/**
 * The template for WooProject page.
 * Template Name: WooProject
 *
 * @package Corpobox
 */
get_header();
?>

<header class="page-header">
<?php 
$args = array('delimiter' => ' &#8250; ');
if (is_plugin_active('woocommerce/woocommerce.php')) {
    woocommerce_breadcrumb($args);
} else {
    corpobox_breadcrumb();
}
?>

	<h1 class="page-title"><?php 
the_title();
?>
</h1>
</header>

	<div id="primary" class="content-area<?php 
if (!is_active_sidebar('projects')) {
    ?>
 no-sidebar<?php 
开发者ID:priyaparasar,项目名称:Project_wordpress,代码行数:31,代码来源:projects.php


注:本文中的woocommerce_breadcrumb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。