Así es como lo tengo:
Código PHP:
<?php
/*
Template Name: Tarjetas
*/
?>
Código PHP:
<?php
//Set the Content Type
header('Content-type: image/jpeg');
?>
Código PHP:
<?php get_header(); ?>
<div class="containing">
<?php
$user = wp_get_current_user();
$id = $user->id
?>
Código PHP:
<?php
// Create Image From Existing File
$jpg_image = imagecreatefromjpeg('http://www.alvarols.com/califica/wp-content/themes/mexicotecalifica/images/tarjeta.jpg');
// Allocate A Color For The Text
$white = imagecolorallocate($jpg_image, 255, 255, 255);
// Set Path to Font File
$font_path = 'http://www.alvarols.com/califica/wp-content/themes/mexicotecalifica/font.TTF';
// Set Text to Be Printed On Image
$text = $id;
// Print Text On Image
imagettftext($jpg_image, 25, 0, 75, 300, $white, $font_path, $text);
// Send Image to Browser
imagejpeg($jpg_image);
// Clear Memory
imagedestroy($jpg_image);
?>
</div>
<?php get_footer(); ?>
Muchas gracias