Show table of users with their avatars
-
Hello, I am not an advanced user, so you can help me.
I have a php that creates a table of users, with a score.The php is programmed to show the default wordpress avatar. But the avatar of this plugin, so it doesn’t show it.
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>ID</th> <th class="user">%s</th> <th class="score">%s</th> %s</tr>' , __( 'user', 'football-pool' ) , __( 'points', 'football-pool' ) , ( $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 class="user">%user_id%</td> <td><a href="%user_link%">%user_avatar%%user_name%</a></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 class="user">%user_id%</td> <td><a href="%user_link%">%user_avatar%%user_name%</a></td> <td class="ranking score">%points%</td> <td>%league_image%</td> </tr>'; } return $ranking_template; }, null, 3 ); ?>
- The topic ‘Show table of users with their avatars’ is closed to new replies.