php 创世纪面包屑。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 创世纪面包屑。相关的知识,希望对你有一定的参考价值。

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Reposition the breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Modify breadcrumb arguments.
add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' );
function sp_breadcrumb_args( $args ) {
	$args['home'] = 'Home';
	$args['sep'] = ' / ';
	$args['list_sep'] = ', '; // Genesis 1.5 and later
	$args['prefix'] = '<div class="breadcrumb">';
	$args['suffix'] = '</div>';
	$args['heirarchial_attachments'] = true; // Genesis 1.5 and later
	$args['heirarchial_categories'] = true; // Genesis 1.5 and later
	$args['display'] = true;
	$args['labels']['prefix'] = 'You are here: ';
	$args['labels']['author'] = 'Archives for ';
	$args['labels']['category'] = 'Archives for '; // Genesis 1.6 and later
	$args['labels']['tag'] = 'Archives for ';
	$args['labels']['date'] = 'Archives for ';
	$args['labels']['search'] = 'Search for ';
	$args['labels']['tax'] = 'Archives for ';
	$args['labels']['post_type'] = 'Archives for ';
	$args['labels']['404'] = 'Not found: '; // Genesis 1.5 and later
return $args;
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Modify Home breadcrumb link.
add_filter ( 'genesis_home_crumb', 'sp_breadcrumb_home_link' ); // Genesis >= 1.5
add_filter ( 'genesis_breadcrumb_homelink', 'sp_breadcrumb_home_link' ); // Genesis =< 1.4.1
function sp_breadcrumb_home_link( $crumb ) {
	return preg_replace('/href="[^"]*"/', 'href="http://example.com/home"', $crumb);
}

以上是关于php 创世纪面包屑。的主要内容,如果未能解决你的问题,请参考以下文章

将面包屑 php 添加到我的引导导航栏

php WooCommerce面包屑

php 面包屑

php 面包屑

php 面包屑

php WordPress SEO面包屑