• Resolved Morris Gilles

    (@morris-gilles)


    Hello there!

    I have been styling my PDF, but am struggling with one aspect: when you open the pdf in the link I posted, or when you download the PDF to your pc, the PDF filename shows “< em >” because part of the title is italicized (instead of just showing the words entered without the HTML code). Can I have the title show without “< em >” while keeping the title partly italicized on my website?

    Thanks in advance!

    • This topic was modified 7 years, 5 months ago by Morris Gilles.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Morris Gilles

    (@morris-gilles)

    PS I realize that the PDF filename cannot be italicized, but that is not the issue. The issue is that I cannot remove the italics HTML command from the filename while keeping it on the rest of my website…

    Hi,

    You need to retrieve the page and remove html tags.
    Add this to your function.php and let me know if it works!

    function thissideupmedia_filename( $filename ) {
      $title = get_the_title();
      $filename = (wp_strip_all_tags($title));
      return $filename;
    }
    add_filter( 'dkpdf_pdf_filename', 'thissideupmedia_filename' );
    
    Thread Starter Morris Gilles

    (@morris-gilles)

    Hi there, it worked like a charm, thanks so much!!!

    Plugin Author dinamiko

    (@dinamiko)

    Thanks @schalkjoubert ??

    I’m going to close the ticket, @morris-gilles feel free to reopen it at anytime or create a new one.

    Thanks,
    Emili

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PDF file name’ is closed to new replies.