RSS feed for each category (35 posts)

  1. singleton
    Posted 9 years ago #

    Otto42 I tried putting your last bit of code in my sidebar and got nothing. I am on 2.4

    I really dont need a list of all feeds, I just need the feed for one particular category

  2. moshu
    Posted 9 years ago #

    Didn't Otto said quite clearly:

    "This must be in the loop. It will spit out the names of the categories, comma separated, with each name being linked to its feed."

  3. singleton
    Posted 9 years ago #

    In trying to debug the code I put echo $cats and got Array, I put echo $num and got 1 (I have 7 categories), and inside the loop I did an echo of $cat and got nothing

  4. DillHK
    Posted 9 years ago #

    I tried using the header code that TyskJohan posted, and it all works, but I get the following error message....

    Warning: Missing argument 3 for get_category_rss_link(), called in /home/.../wp-content/themes/.../header.php on line 20 and defined in /home/.../wp-includes/feed-functions.php on line 115

    I have really no idea what that means... Can anyone please help??

  5. mstegink
    Posted 9 years ago #

    I wanted to have a list of feeds per category outside the loop. Therefore I did:

    global $wpdb;
    $cats = $wpdb->get_results("SELECT *
    FROM $wpdb->categories ORDER BY cat_name");
    foreach ($cats as $cat) {
    echo '<li><a href="baseurl/category';
    echo $cat->category_nicename.'/feed/">';
    echo $cat->cat_name.'</a></li>';

    I whipped it in a plugin for anyone who cares

Topic Closed

This topic has been closed to new replies.

About this Topic