Display view all link inside template of last player list
This commit is contained in:
@@ -115,10 +115,12 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
|||||||
$groups = array( $group );
|
$groups = array( $group );
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
$j = 0;
|
||||||
|
|
||||||
foreach ( $groups as $group ):
|
foreach ( $groups as $group ):
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
echo '<div class="sp-template sp-template-player-gallery">';
|
echo '<div class="sp-template sp-template-player-gallery sp-template-gallery">';
|
||||||
|
|
||||||
if ( ! empty( $group->name ) ):
|
if ( ! empty( $group->name ) ):
|
||||||
echo '<a name="group-' . $group->slug . '" id="group-' . $group->slug . '"></a>';
|
echo '<a name="group-' . $group->slug . '" id="group-' . $group->slug . '"></a>';
|
||||||
@@ -147,10 +149,16 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
|||||||
|
|
||||||
endif; endforeach;
|
endif; endforeach;
|
||||||
|
|
||||||
|
$j++;
|
||||||
|
|
||||||
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
||||||
echo '<br style="clear: both" />';
|
echo '<br style="clear: both" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $show_all_players_link && ( 'position' !== $grouping || $j == count( $groups ) ) ) {
|
||||||
|
echo '<div class="sp-player-gallery-link sp-gallery-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
@@ -158,10 +166,6 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
|||||||
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
||||||
echo '<br style="clear: both" />';
|
echo '<br style="clear: both" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $show_all_players_link ) {
|
|
||||||
echo '<div class="sp-player-list-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user