• kalinbooks, congratulations on your plugin, I noticed you updated it recently, well done.

    Kalin, how can you limit the download PDF option to posts only? I wouldn’t like it to appear on pages, but I don’t want to have to manually select “Do not generate PDF” in the custom field of every page.

    Is there something I need to add to the plugin files or to the functions.php of the theme?

    https://www.ads-software.com/plugins/kalins-pdf-creation-station/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author kalinbooks

    (@kalinbooks)

    If you open kalins-pdf-creation-station.php in the plugin folder, on line 362 there is an if statement:

    if($post->post_type == "page"){
    $postID = "pg_" .$postID;
    }else{
    $postID = "po_" .$postID;
    }

    If you add this: return $content; inside the main block of the if statement, you can prevent it from showing the link on pages. If you put it in the else statement, it’ll prevent it from showing on everything but pages.

    One of the next features I wanted to add was the ability to have different pdf templates for each category or parent pages, but it doesn’t look like I’m going to have the time to continue making updates except for maybe a random bug fix here or there if people point them out to me.

    Thread Starter Jonas Xander

    (@john-alexander)

    Thanks Kalin, I’ll give it a try.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Kalin, how to not show "download PDF" on pages by default?’ is closed to new replies.