返信先: 【解決済】パンくずリストの表示順について

フォーラム 使い方全般 【解決済】パンくずリストの表示順について 返信先: 【解決済】パンくずリストの表示順について

#94847
goriragorira
参加者

プラグインは利用していません。
使用しているテーマのICONICにあるbreadcrumb.phpで設定されてあるみたいです。
参考までに一部のコードを記載します。

<?php
elseif ( is_welcart_single() ) :
	if ( defined( 'USCES_ITEM_CAT_PARENT_ID' ) ) :
		$category = get_category( (int) USCES_ITEM_CAT_PARENT_ID );
		if ( $category ) :
?>
			<li class="p-breadcrumb__item c-breadcrumb__item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
				<a href="<?php echo esc_url( get_category_link( $category->term_id ) ); ?>" itemscope itemtype="http://schema.org/Thing" itemprop="item">
					<span itemprop="name"><?php echo esc_html( $category->name ); ?></span>
				</a>
				<meta itemprop="position" content="<?php echo $breadcrumb_position++; ?>" />
			</li>
<?php
		endif;
	endif;

	$category = get_welcart_category();
	if ( $category ) :
?>
			<li class="p-breadcrumb__item c-breadcrumb__item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
				<a href="<?php echo esc_url( get_category_link( $category->term_id ) ); ?>" itemscope itemtype="http://schema.org/Thing" itemprop="item">
					<span itemprop="name"><?php echo esc_html( $category->name ); ?></span>
				</a>
				<meta itemprop="position" content="<?php echo $breadcrumb_position++; ?>" />
			</li>
<?php
	endif;
?>
			<li class="p-breadcrumb__item c-breadcrumb__item">
				<span itemprop="name"><?php echo strip_tags( get_the_title( $post->ID ) ); ?></span>
			</li>