Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you are using nice permalinks, I have an automatic way to put feed links on each archive pages. Instead of writing-out the text for the feed as suggested above, try using the following code:

    <a href="feed:<?php bloginfo('url'); ?>/category/<?php echo single_cat_title(); ?>/feed/"

    For example, if you have a category called “Books” the link above should automatically produce the link for:

    feed://www.example.com/category/Books/feed/

    Obviously if you set up your permalinks differently for categories, then you have to customize it accordingly. I’m not sure how it would work using the default links.

    Now, this has a minor glitch in that when you click a date-based category and then click the feed link, it defaults to the Atom feed for the entire site. Harmless, but it may be annoying to you.

    Maybe someone else can tell me how to use an If..else argument to get the feed link only on category archives? I’m actually a newbie to coding.

    Hello,

    This is my problem: I want to use pagination for posts and comments.

    I have started to use keyvan, but I would like to put it on the last page of my post only (so readers don’t get distracted by the fun of the comments board). Anyway, I implemented Keyvan’s plugin and tried to simultaneously implement the code above that forces the comment_template to the last page. But I’m having trouble getting them to work together.

    <?php if((1 == $numpages) || (get_query_var('page') == $numpages)) { comments_template(); } ?>

    <?php if (function_exists('paged_comments_template')) paged_comments_template(); else comments_template(); ?>

    This is what I came up with (it almost worked but the other comments pages disappear and go to the 1st post page):

    <?php if((1 == $numpages) || (get_query_var('page') == $numpages)) {
    if (function_exists('paged_comments_template')) paged_comments_template(); else comments_template();
    } ?>

    Don’t laugh too hard, I’m very new at coding (a little over a month self-taught).

    Please help,

    I know this is a layup for most of you out there.

    Thanks in advance,
    Mike

    Forum: Plugins
    In reply to: wp-print problem
    mlmedia

    (@mlmedia)

    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.

    Forum: Plugins
    In reply to: wp-print problem
    mlmedia

    (@mlmedia)

    Hey Gamerz,

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

Viewing 4 replies - 1 through 4 (of 4 total)