Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think this is more portable:


    <?php if (is_category()) {?>
    <a href="<?php get_category_rss_link(1,intval( get_query_var('cat'))); ?>">Subscribe</a>
    <?php } ?>

    frankp, I’m afraid the code snippet I posted no longer works in WP201.

    OK here is what I added to the header template, if anyone’s interested.


    <?php
    if (is_category()) {
    $fullrss = get_category_rss_link(0,intval( get_query_var('cat')));
    } else {
    $full_rss = get_bloginfo_rss('rss2_url');
    };
    $rss2_url = $fullrss;
    $rss_url = $fullrss."rss/";
    $atom_url = $fullrss."atom/";
    ?>
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php echo $rss2_url; ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php echo $rss_url; ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php echo $atom_url; ?>" />

    OK, so it can be hacked. But what I want (and am trying to hack) is to make the “implicit” RSS feed announced in the header (as link-alternative, which is what browsers subscribe to) for the archive pages for a category to be the RSS feed for that category instead of the RSS feed for the whole blog.

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