• Resolved JG

    (@gmgartner)


    I want to be able to separate my feeds by content but have not been able to find a plugin to do this. Any advice in this regard is appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • No need for plugin.
    WP creates the category feeds out of the box.
    example.com/category/mycategory/feed – if using permalinks;
    otherwise they are at:
    example.com/?cat=1&feed=rss2

    Thread Starter JG

    (@gmgartner)

    Thanks much. I was using example.com/feed/category/mycategory. That explains it.

    Thread Starter JG

    (@gmgartner)

    Now that I have that straightened out, how do I call the category slug? get_the_category only seems to let me get id, title, and description. I’m using

    foreach((get_the_category()) as $cat) {
    echo $cat->cat_name . ' ';
    }

    as I am constructing a feed link on each category page. My loop doesn’t give me the slug though.

    Thread Starter JG

    (@gmgartner)

    Since the table column in wp-categories is category_nicename,

    foreach((get_the_category()) as $cat) {
    echo $cat->category_nicename . '/feed';
    }

    gets the job done. I see that I can call table data by column name. Safe to assume other functions work by the same logic. I’ll see.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Separate RSS Feeds by category or topic’ is closed to new replies.