WordPress.org

Ready to get started?Download WordPress

Forums

rss2 (10 posts)

  1. Geoffrey Sneddon
    Member
    Posted 10 years ago #

    How can I make it only display the storys from the category 2004?

  2. OperaManiac
    Member
    Posted 10 years ago #

    afair add an argument ?cat=x after the rss file!
    ex:
    wp-rss2.php?cat=2

  3. Ryan Boren
    WordPress Dev
    Posted 10 years ago #

    Or, if you're using permalinks with a nightly build:
    /archives/category/category-name/rss2/

  4. Geoffrey Sneddon
    Member
    Posted 10 years ago #

    Doesn't work, I made a new rss thing, I forgot to say
    <pre><?php echo '<?xml version="1.0"?'.'>'; ?>
    <?php
    $blog = 1;
    $doing_rss = 1;
    header('Content-type: text/xml', true);
    require('wp-blog-header.php');
    /* This doesn't take into account edits
    // Get the time of the most recent article
    $maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts");
    $unixtime = strtotime($maxdate);
    // format timestamp for Last-Modified header
    $clast = gmdate("D, d M Y H:i:s \G\M\T", $unixtime);
    $cetag = (isset($clast)) ? md5($clast) : '';
    // send it in a Last-Modified header
    header("Last-Modified: " . $clast, true);
    header("Etag: " . $cetag, true);
    */
    if (!isset($rss_language)) { $rss_language = 'en'; }
    if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
    if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
    ?>
    <rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
    <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
    <item>
    <content:encoded><?php the_content('', 0, '') ?></content:encoded>
    </item>
    <?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
    </channel>
    </rss>
    </pre>

  5. Geoffrey Sneddon
    Member
    Posted 10 years ago #

    It changed the doller sign to $...

  6. Ryan Boren
    WordPress Dev
    Posted 10 years ago #

    What are you trying to do? If you want a feed for all posts from 2004, do this:
    wp-rss2.php?year=2004

  7. Geoffrey Sneddon
    Member
    Posted 10 years ago #

    i'll try that

  8. Geoffrey Sneddon
    Member
    Posted 10 years ago #

    that makes it blank though, oh i give up... (don't need it anyway, i want it though).

  9. carthik
    Member
    Posted 10 years ago #

    When I was eleven, I hadn't yet been given user access to the computer at home! Great job with the pages, and the attempted code, link92!!

  10. Geoffrey Sneddon
    Member
    Posted 10 years ago #

    How did you know I was 11, aboutme.geoffers.uni.cc?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.