WordPress.org

Ready to get started?Download WordPress

Forums

PDF24 Article To PDF
show plugin only in articles not in pages (4 posts)

  1. oreste
    Member
    Posted 3 years ago #

    Is it possible to show pdf link only in articles, but not in pages?

    http://wordpress.org/extend/plugins/pdf24-post-to-pdf/

  2. nsantillo
    Member
    Posted 2 years ago #

    Yes this is possible. Sorry it took a bit to get you an answer on this but this will also help others who need this too.

    First what you need to do is in the PDF24 plugin options you should
    uncheck "Article Plugin".

    Then scroll down to "Top Bottom Plugin" in the PDF24 plugin options. Check that and select the type of box you want displayed on the template.

    Here comes the tricky part and where you will need to add some coding to your template.

    Open up your single.php template file. Most templates have this file. It is the file that controls the look of your posts. If your template does not utilize a single.php file you can create one by copying your index.php file located in your theme's folder.

    You will have to add this php code to your template:

    <?php pdf24Plugin_topBottom(); ?>

    Please note that this MUST be placed OUTSIDE the loop. If you accidentally put it inside the loop it will keep rendering your post over and over and over making your page a million miles long.

    Put it either above the loop or below the loop but NEVER inside the loop.

    This is usually before
    <?php if(have_posts()):?>
    or put it right before your footer. <!-- footer -->

    I hope this helps. And good luck. :)

  3. cozbaldwin
    Member
    Posted 2 years ago #

    This is not the most ideal solution, as it has to be below everything - including the comments - so many may not even see it.

    I hope a more convenient solution can be obtained (or created) in the future.

  4. nsantillo
    Member
    Posted 2 years ago #

    Well you could always put it above everything too. Or hard code it in your sidebar as well. Just as long as it does not go in the loop.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic