Another Dynamic Content Problem
-
I have a post using php to get user_meta. Here is the code.
By <?php // Get the user ID $user_id = get_current_user_id(); // echo $user_id ; $key1 = 'first_name'; $key2 = 'last_name'; $single = true; $user_first = get_user_meta( $user_id, $key1, $single ); $user_last = get_user_meta( $user_id, $key2, $single ); echo $user_first . ' ' . $user_last; ?>The text prints properly in the wordpress post showing my information. However, when the pdf is created, the php looks for data for user 0 (zero) and omits the dynamic text.
I have set
define('DISABLE_PDF_CACHE', true);
in the wp-config.php file, and it has been working properly (I tested by change some text in the template).Any suggestions? So far I’m really excited about this plugin. It looks like it may have some flexibility that I have been looking for.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Another Dynamic Content Problem’ is closed to new replies.