Ok, Thank you – I will give it a try ??
Maybe I can use your code in help:
<?php
// Show number of predictions in the ranking table and also the user avatar.
// If you want the page, shortcode or widget to have different layouts,
// you can differentiate with the $type.
add_filter( ‘footballpool_ranking_template_start’,
function( $template_start, $league, $user, $ranking_id, $all_user_view, $type ) {
// add a row with column headers
$template_start .= sprintf( ‘<tr>
<th></th>
<th class=”user”>%s</th>
<th class=”num-predictions”>%s</th>
<th class=”score”>%s</th>
%s</tr>’
, __( ‘user’, FOOTBALLPOOL_TEXT_DOMAIN )
, __( ‘predictions’, FOOTBALLPOOL_TEXT_DOMAIN )
, __( ‘points’, FOOTBALLPOOL_TEXT_DOMAIN )
, ( $all_user_view ? ‘<th></th>’ : ” )
);
return $template_start;
}, null, 6 );
add_filter( ‘footballpool_ranking_ranking_row_template’, function( $template, $all_user_view, $type ) {
if ( $all_user_view ) {
$ranking_template = ‘<tr class=”%css_class%”>
<td style=”width:3em; text-align: right;”>%rank%.</td>
<td>%user_avatar%%user_name%</td>
<td class=”num-predictions”>%num_predictions%</td>
<td class=”ranking score”>%points%</td>
<td>%league_image%</td>
</tr>’;
} else {
$ranking_template = ‘<tr class=”%css_class%”>
<td style=”width:3em; text-align: right;”>%rank%.</td>
<td>%user_avatar%%user_name%</td>
<td class=”num-predictions”>%num_predictions%</td>
<td class=”ranking score”>%points%</td>
</tr>’;
}
return $ranking_template;
}, null, 3 );
?>