Print Friendly and PDF Button
How to not show the button on certain pages, etc.... (6 posts)

  1. luuuciano
    Posted 2 years ago #


    We want to show this button in a lot of pages, almost 99% of them...
    But... we have a few ones, just a few, where we do not want to show it...
    You know, the contact page, advanced search, things like that...

    What to do? any idea?

    best regards!


  2. luuuciano
    Posted 2 years ago #

    Ok, here the way I solved it, maybe it helps others...

    I have disabled the option to show the button in Pages... and then, in the page.php theme file added

    if (!is_singular( array( 20, 27 ) )) {
    if(function_exists('pf_show_link')){echo pf_show_link();}

    20, 27
    are the ID numbers of my contact & advanced search...

    Thanks a lot for this plugin, it works great!

  3. luuuciano
    Posted 2 years ago #

    Oops... I thought it was working... but echo pf_show_link(); is not working at all...
    Do not show anything...
    What should I do to have the function pf_show_link() working on that section?

  4. printfriendly
    Plugin Author

    Posted 2 years ago #

    One method to hide the button on certain pages is via css. Include the following css on pages you do not want the button appearing.

    <style type="text/css" media="all">.printfriendly {display: none!important;}</style>

  5. luuuciano
    Posted 2 years ago #

    Thanks! will have that in mind...

    Anyway, I tried adding
    echo pf_show_link();
    to the page.php theme file
    (just that, without any if statment, etc... so, it should work)

    But... it is not printing anything... it is like the function is not present there?
    Do I need to do something else to have the pf_show_link() function working ok on those files?

    Best regards

  6. luuuciano
    Posted 1 year ago #

    Finally, I have used this:

    if (!is_page( array( 20,27,88,162,166,169 ) )) {
    echo pf_show_link();

    And the pf_show_link() was not working because I NEEDED to select the last check button on the setup... I thought we can use the previous ones, and add it to theme files too

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Print Friendly and PDF Button
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic