Отсутствует поле "item" - ошибка в Гугл вебмастере
Всем привет, может поможет кто разобраться. Ругается на цепочку крошек, может я упустил что-то из виду.
Отсутствует поле "item" - ошибка в Гугл вебмастере
Ругается вот на этот кусок кода:
Главная
Код в шаблоне такой:
// Open the unordered list. $breadcrumb .= '';
// Add the number of items and item list order schema. $breadcrumb .= sprintf( '', absint( $item_count ) ); $breadcrumb .= '';
// Loop through the items and add them to the list. foreach ( $this->items as $item ) {
// Iterate the item position.
++$item_position;
// Check if the item is linked.
preg_match( '/(<a.*?>)(.*?)(<\/a>)/i', $item, $matches );
// Wrap the item text with appropriate itemprop.
$item = !empty( $matches ) ? sprintf( '%s<span itemprop="name">%s</span>%s', $matches[1], $matches[2], $matches[3] ) : sprintf( '<span itemprop="name">%s</span>', $item );
// Add list item classes.
$item_class = 'trail-item';
if ( 1 === $item_position && 1 < $item_count )
$item_class .= ' trail-begin';
elseif ( $item_count === $item_position )
$item_class .= ' trail-end';
// Create list item attributes.
$attributes = 'itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="' . $item_class . '"';
// Build the meta position HTML.
$meta = sprintf( '<meta itemprop="position" content="%s" />', absint( $item_position ) );
// Build the list item.
$breadcrumb .= sprintf( '<li %s>%s%s</li>', $attributes, $item, $meta );
}
// Close the unordered list. $breadcrumb .= '';
Помогите разобраться где что поправить?