• Law

    (@laucoste)


    Hello,

    Could you help me to custom the file “point.php” in “/components/points/includes” (I guess lines 1225 – 1257) please ?

    In the table of the top users (shortcode [wordpoints_points_top]), I just would need to add a link on each username to their own profile page. (I change my user slug from ‘/author’ to ‘/m’).

    Please let me know the little trick I have to do.

    Regards,
    Laurent

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Law

    (@laucoste)

    Hi everyone,
    Coud you help me about this question please ?
    Thanks
    Regards

    Plugin Author J.D. Grimes

    (@jdgrimes)

    Hi @laucoste, sorry for the late reply.

    What you need to do is add code like this to a custom plugin or your child theme:

    
    function wp11242255_top_username_filter( $name, $user_id ) {
    
        $user = get_userdata( $user_id );
    
        return '<a href="/m/' . $user->nicename . '">' . $name . '</a>';
    }
    add_filter( 'wordpoints_points_top_users_username', 'wp11242255_top_username_filter' );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Top table – Link to each listed user’ is closed to new replies.