• Resolved wisconsingrappler

    (@wisconsingrappler)


    I’d like to change the order of the items shown in the sp-player-details section (Player Profile). I used “Inspect” to find the section of code for this, but I’m not super familiar with where to find it in the Theme File Editor. Any advise or help?
    The area I want to change the order for is highlighted in this image.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi there @wisconsingrappler ,

    Player Details can be manipulated through filter 'sportspress_player_details'.

    You can see at wp-content/plugins/sportspress/templates/player-details.php of how $data array is structured.

    Try something like:

    add_filter( 'sportspress_player_details', 'custom_modify_player_details', 10, 2 );

    function custom_modify_player_details( $data, $id ) {
    $new_data['custom_key'] = 'Custom Value';

    // Return the modified $data array
    return $new_data;
    }

    Thanks,
    Savvas

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.