custom fields not displayed in the pdf
-
I have modified this file wp-post-to-pdf.php
i have replace
$html .= htmlspecialchars_decode(htmlentities($post->post_content, ENT_NOQUOTES, 'UTF-8', false), ENT_NOQUOTES);
by
global $post;
$ville = get_post_meta($post_id,'contenu_annonce_ville',true);
$region = get_post_meta($post_id,'contenu_annonce_region',true);
$contrat = get_post_meta($post_id,'contenu_annonce_contrat',true);
$new_content=$post->post_content.$ville.$region.$contrat;</p>
<p> $html .= htmlspecialchars_decode(htmlentities($new_content, ENT_NOQUOTES, 'UTF-8', false), ENT_NOQUOTES);
In the pdf i have just the title. Not the content and not the content of custom fields.
If i click SAVE & RESET THE PDF CACHE i have the content and the content of custom fields in my pdf.Why my pdf is empty if i don’t click on “SAVE & RESET THE PDF CACHE” ?
What must i do to have the content in the pdf ?Thank you
- The topic ‘custom fields not displayed in the pdf’ is closed to new replies.