• Resolved juliefltinv32

    (@juliefltinv32)


    Hey,
    I’d like to add informations on the template of the gallery players. I would like to add the height, the weight and the date of birth if possible but I can’t find the name of the variable.

    Anyone can there who can help me with this ?
    Thank’s all.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi there @juliefltinv32 ,

    The metrics of a player are stored as post_meta data with key sp_metrics for each player. So you can retrieve them using the function get_post_meta( $player_id, 'sp_metrics', true );. The return will be an array in the following form:

    array (
        'height' => '50',
        'weight' => '128',
      )

    .
    So you will need to make further iteration (i.e. using foreach())

    The DoB can be retrieved using the function get_the_date( 'd m Y', $player_id );

    Thanks,
    Savvas

    Thread Starter juliefltinv32

    (@juliefltinv32)

    Ok, thank you for your answer. 🙂

    Plugin Contributor Savvas

    (@savvasha)

    You are welcomed 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘metrics to player gallery’ is closed to new replies.