WordPress.org

Ready to get started?Download WordPress

Forums

Category ID on category page (2 posts)

  1. Mr_Cynical
    Member
    Posted 8 years ago #

    I want to have a link to each category's RSS feed on the category page itself e.g. http://www.davidarussell.co.uk/category/blogging , however I am aware that I need to have the category ID to do this ie /wp-rss2.php?cat=xx . Is there a template tag I can use to get the category ID of the category archive currently being viewed (rather than the category id of a post in The Loop) for this purpose?

  2. sumeetjain
    Member
    Posted 8 years ago #

    You don't need the category id. http://www.davidarussell.co.uk/category/blogging/feed is the URI for your RSS feed for the category.

    Just put this somewhere in your template file for archives/categories:

    <a href="feed/" title="This Category's RSS Feed">Subscribe to RSS Feed</a>

    That should work - does for me.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags