• Resolved Torsten Bulk

    (@tobulk)


    Hello Emili,

    I want the object ID as an individual PDF name. But do not get this.

    Here is the code:

     <?php
    
                /* Property ID if exists */
                $property_id = get_post_meta( $post->ID, 'REAL_HOMES_property_id', true );
                if ( ! empty( $property_id ) ) {
                    echo esc_html__( 'Property ID','framework' ) . ': ' . esc_html( $property_id );
                }
    
                ?>

    Thanks for your support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Torsten Bulk

    (@tobulk)

    And how are special characters in the PDF name?

    Plugin Author dinamiko

    (@dinamiko)

    Hi Torsten,

    In order to change the PDF file name you can use dkpdf_pdf_filename filter, add this to your theme functions.php

    function custom_dkpdf_pdf_filename( $filename ) {
      $current_user = wp_get_current_user();
      $filename = $current_user->display_name.' '.get_the_title();
      return $filename;
    }
    add_filter( 'dkpdf_pdf_filename', 'custom_dkpdf_pdf_filename' );

    In the above example I’m adding the author of the post but you can add your own logic, of course.

    Thanks,
    Emili

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

The topic ‘Individual PDF Name’ is closed to new replies.