Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author redcocker

    (@redcocker)

    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

    diezel

    (@diezel)

    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

    (@redcocker)

    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.