Title: [Plugin: POST2PDF Converter] displaying post meta data
Last modified: August 20, 2016

---

# [Plugin: POST2PDF Converter] displaying post meta data

 *  [norix](https://wordpress.org/support/users/novic7/)
 * (@novic7)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-displaying-post-meta-data/)
 * Hi redcocker, I am trying to get the post meta (meta_value) into the pdf file
   output, but I have so far no success. Could you help me to figure out how to 
   do that?
    Thanks in advance.
 * [http://wordpress.org/extend/plugins/post2pdf-converter/](http://wordpress.org/extend/plugins/post2pdf-converter/)

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

 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-displaying-post-meta-data/#post-2686677)
 * Hi, novic7 san
 * To get post meta data and insert it into your post, you can add the following
   code into post2pdf-converter-pdf-maker.php(around line 371).
 *     ```
       $key_value = get_post_meta($post_id, 'YOUR_KEY', true);
       $content = $content + $key_value;
       ```
   
 * or
 *     ```
       $key_value = get_post_meta($post_id, 'YOUR_KEY', true);
       $content = $key_value + $content;
       ```
   
 * Ref.: [http://codex.wordpress.org/Function_Reference/get_post_meta](http://codex.wordpress.org/Function_Reference/get_post_meta)
 *  [diezel](https://wordpress.org/support/users/diezel/)
 * (@diezel)
 * [14 years ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-displaying-post-meta-data/#post-2686727)
 * Hello redcocker,
 * I really like this plugin that converts the post to pdf. I have the same problem
   as novic7. The code that you provided seems to be working but I have to do **
   $content = $key_value;**otherwise it will not work. The problem was the post 
   will not appear in the PDF output every time I insert your code in line 371 of
   post2pdf-converter-pdf-maker.php. The only thing that will be displayed is the
   value of the **$content**
 * I also cannot display all 10 post metadata that I have for each post. Do you 
   have a code that will query or display all post metadata for this plugin.
 * Your help will be very much appreciated.
 * Thanks,
 * Diezel
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-displaying-post-meta-data/#post-2686748)
 * Hi, novic7 san, diezel san
 * Sorry, I made a simple mistake.
 * Please add following code instead of previous code.
 *     ```
       $key_value = get_post_meta($post_id, 'YOUR_KEY', true);
       $content = $content.$key_value;
       ```
   
 * or
 *     ```
       $key_value = get_post_meta($post_id, 'YOUR_KEY', true);
       $content = $key_value.$content;
       ```
   

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

The topic ‘[Plugin: POST2PDF Converter] displaying post meta data’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post2pdf-converter_cad3dd.svg)
 * [POST2PDF Converter](https://wordpress.org/plugins/post2pdf-converter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post2pdf-converter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post2pdf-converter/)
 * [Active Topics](https://wordpress.org/support/plugin/post2pdf-converter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post2pdf-converter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post2pdf-converter/reviews/)

## Tags

 * [meta_value)](https://wordpress.org/support/topic-tag/meta_value/)

 * 3 replies
 * 3 participants
 * Last reply from: [redcocker](https://wordpress.org/support/users/redcocker/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-displaying-post-meta-data/#post-2686748)
 * Status: not resolved