Avoid Schema error: "Missing field location"
This commit is contained in:
@@ -388,7 +388,8 @@ $identifier = uniqid( 'eventlist_' );
|
||||
endif;
|
||||
|
||||
if ( sp_column_active( $usecolumns, 'venue' ) ):
|
||||
echo '<td class="data-venue" data-label="'.__( 'Venue', 'sportspress' ).'">';
|
||||
echo '<td class="data-venue" data-label="'.__( 'Venue', 'sportspress' ).'" itemprop="location" itemscope itemtype="http://schema.org/Place">';
|
||||
echo '<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">';
|
||||
if ( $link_venues ):
|
||||
the_terms( $event->ID, 'sp_venue' );
|
||||
else:
|
||||
@@ -397,6 +398,13 @@ $identifier = uniqid( 'eventlist_' );
|
||||
echo $venue->name;
|
||||
endforeach; endif;
|
||||
endif;
|
||||
echo '</div>';
|
||||
echo '</td>';
|
||||
else:
|
||||
echo '<td style="display:none;" class="data-venue" data-label="'.__( 'Venue', 'sportspress' ).'" itemprop="location" itemscope itemtype="http://schema.org/Place">';
|
||||
echo '<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">';
|
||||
_e( 'N/A', 'sportspress' );
|
||||
echo '</div>';
|
||||
echo '</td>';
|
||||
endif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user