• Resolved Juha Mets?kallas

    (@juhametsakallas)


    Hello!

    There is a certain post, for which I like to have a manually created PDF attached instead of the automatically created by WP-MPDF. How I disable the automation for this post?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author fkrauthan

    (@fkrauthan)

    Hey,

    No this is not supported by the plugin. You could add an additional condition into your template where you embed the PDF button to not print the button for certain posts.

    Thread Starter Juha Mets?kallas

    (@juhametsakallas)

    Ok, when I have time, I try to figure out a general solution.

    Thread Starter Juha Mets?kallas

    (@juhametsakallas)

    Hello!

    I finally found time to resolve this.

    1. Download and install the plugin Advanced Custom Fields.
    2. Create a custom field with title Disable PDF and name disable_pdf with a type of True/False. This will give you an extra field in the posts editor. Don’t make it mandatory nor set it to default. This ensures, that the field doesn’t mess with your existing posts.
    3. Go to your template and locate the code snippet <?php if(function_exists(‘mpdf_pdfbutton’)).
      Replace it and only it with <?php if(function_exists('mpdf_pdfbutton') && !get_field('disable_pdf')).
    4. Locate the certain post for which you want to disable the pdf creation. Check the Disable PDF. Save and take a look at the posts page.

    @juhametsakallas
    My apologies to you, the Mod and @fkrauthan because the following is irrelevant to the initial post.
    Hello Juha.
    I wish there was a way to send private messages to forum members. I had to track you because I need your help/advise about Dis-puto theme on TForest. I feel frustrated that the dev ignores my questions but your answers on the support page indicate you’ve got some good knowledge of the product. I really need your honest brutal opinion about the theme and your experience with the developer to help me make an informed decision.
    If you wouldn’t mind, my email address is drjohn dimi @ g mail . com – all one collapsed word. Thank you.
    JD

    Plugin Author fkrauthan

    (@fkrauthan)

    @drjohndimi Unfortunately I can not provide any support on other plugins and/or themes.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to disable for a certain post?’ is closed to new replies.