• I installed gamerz wp-print i got it working with posts but it does not work with pages of my website.

    is it possible to make it work for all the pages of the website or does it apply only to posts

    thanx

    julius

Viewing 11 replies - 31 through 41 (of 41 total)
  • Yes – Its even great where it works. Thanks a lot for the plug, really (and I have already upgraded the PHP-file).

    The thing is though – I want it to work at Pages to (not only posts). Look at this at the bottom.

    Sorry for double posting – missed that it did publish first time. Thought it got lost. Missed the second page.

    Okie try this

    Replace:
    <a href="<?php the_permalink(); ?>print/">Print This Article</a>
    With:
    <?php if(is_page()) : ?>
    <a href="wp-print.php?page_id=<?=the_ID()?>">Print This Article</a>
    <?php else : ?>
    <a href="wp-print.php?p=<?=the_ID()?>">Print This Article</a>
    <?php endif; ?>

    Well – still no success – but something happened. Before it linked print to domain/page/print now its linking to domain/page/wp-print.php?page_id=XX (XX is the page ID)

    The mess:
    “The requested URL /english/wp-print.php was not found on this server.”

    Guess it has to back one step.

    I have replaced the code everywhere – in index, single and page.php

    And again – thanks for taking time.

    I checked at it again.

    Now – when i klick the print link – it links to (missing):
    domain/page/wp-print.php?page_id=XX (XX is the page ID)

    If I skip the /page and go to the printpage direct under domain (like the link below) – it works.
    domain/wp-print.php?page_id=XX (XX is the page ID)

    But how do I change the script to always go to root (domain)?

    try
    /wp-print.php?p=<?=the_ID()?>

    Okie I get the bug, because it is using normal query string and not permlink, I will try to make a permlink one soon asap. Use the above solution for the time being, then when I get home I will create a permlink print page for pages.

    Now the permlink is something like 2005/11/17/articlename/print for normal post. What you guy suggest for pages? 2005/11/17/articlename/printpage/ how about that?

    Thanx a lot GamerZ – this solution was enought for me. I did put a slash before all ‘wp-print.php?p’ in page.php and single.php – and now its working!

    I dont really know the difference between normal query string and permlink – but I guess som other will enjoy the mod too! /printpage seems to be logic.

    lol okie thanks. I am updating it now =)

    Just got back home.

    Hey Gamerz,

    Thanks for the great plugins. It’s people like you who make WordPress so great!!!

    Just to reiterate for those who got lost in the back-and-forth above. The code to insert below

    <?php while (have_posts()) : the_post(); ?>

    in the single.php page (or any page) and whether you use the default or custom permalinks should be…

    <?php if(is_page()) : ?>
    <a href="<?php bloginfo('url'); ?>/wp-print.php?page_id=<?=the_ID()?>">Print This Page</a>
    <?php else : ?>
    <a href="<?php bloginfo('url'); ?>/wp-print.php?p=<?=the_ID()?>">Print This Article</a>
    <?php endif; ?>

    For whatever reason, the plugin was not generating a print page for me (Not found error), but the above code fixed it. Apparently it doesn’t matter if you use permalinks or not to make the above work. No one’s going to want to link to a pretty permalink for the print version anyway.

    Thanks to Gamerz and the above unnamed poster. This is a great plugin.

    welcome =)

Viewing 11 replies - 31 through 41 (of 41 total)
  • The topic ‘wp-print problem’ is closed to new replies.