Support » Plugin: Post PDF Export » Advanced custom fields

Viewing 2 replies - 1 through 2 (of 2 total)
  • I reckon I could figure it out if I could add PHP to the template loop?

    Bazzinga!!!!!!!

    It may not be the most elegant fix but I made a new shortcode for “Post PDF Export”. I added the below to “post-pdf-export/post-pdf-export.php”, which you can get to by clicking edit under “Post PDF Export” on the plugin page:

    <?php
    
    //[custom1]
    function custom1_func( $atts ){
    $custom1 = get_field('field_name');
    return $custom1;
    }
    add_shortcode( 'custom1', 'custom1_func' );
    ?>

    The “field_name” is the field name of the ACF field. Paste [custom1] into your template loop on “Post PDF Export” template manager in WordPress and ya done, ACF fields in a PDF!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Advanced custom fields’ is closed to new replies.