Generate category/search feed URLs? (3 posts)

  1. Alex Mills (Viper007Bond)
    Posted 10 years ago #

    Is there a function to generate the URL to the feeds for categories? I wanna do like Currently viewing all posts in the category "foobar" -- feed for this category.

    I'd rather not have to manually create them if I don't have to as I'm using a base URL and I can't just do <a href="feed/">feed</a>.

    If I am stuck manually doing so, is there a variable that's set to the stub name for a category? I know $cat is the category ID...

  2. Prometheus
    Posted 10 years ago #

    Dont know if this helps, but you can use the_category_rss() int the Loop:

    or in the wp_lists_cats() there is an argument for feeds and feed-image:

  3. Alex Mills (Viper007Bond)
    Posted 10 years ago #

    the_category_rss() has to be used within The Loop and is meant for being using inside of a RSS feed. And all it does it spit out the name anyway.

    wp_list_cats() lists out all categories and can stick a link to the feed for each category after each category. I just want one link, not a list or a bunch of links.

    Neither is what I want, but thanks anyway. :)

    [edit] I'm looking for something like bloginfo('rss2_url');, but for categories. [/edit]

Topic Closed

This topic has been closed to new replies.

About this Topic