WordPress.org

Support

Support » How-To and Troubleshooting » How to get RSS feed name to display category name?

How to get RSS feed name to display category name?

  • I’m trying to set up an rss2 feed for a category.

    It’s working, but I’ve noticed the feed name does not get named after the category, but rather the blog.

    I thought the feed got named after the page title?

    The title of my blog pages are generated in the header.php like this:

    <title>My Blog<?php wp_title(); ?></title>

    This seems to work fine when viewing posts by category using a url like this:

    http://www.example.com/?cat=9

    So the the page title is: My Blog >> My Category

    All well and good, BUT, if I click on the feed link:

    <?php echo '<a href="http://www.example.com/?feed=rss2&amp;cat='.trim($_GET['cat']).'"'; ?>>Feed Link</a>

    The feed DOES NOT get named My Blog >> My Category.

    How can I get the feed to include the categroy name?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • An example of the behavior I’m looking for is this:

    http://www.example.com/?feed=rss2&p=18

    When you click on this link, you get a feed with the title:

    Comments on: My Post Title

    Why don’t I get a feed with the title:

    My Blog >> My Category

    when clicking on:

    http://www.example.com/?feed=rss2&cat=9

    ???

    Is this just the way the ?feed=rss2&cat=9 function works?

    Is it possible to modify how the name of the feed appears?

    How does the comment feed get its title?

    Why does the comment feed appear:

    “Comments on:” [post title]”

    when the tag uses the same format:

    ?feed=rss2&p=18?

    Where is the title info coming from?

    ???

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get RSS feed name to display category name?’ is closed to new replies.
Skip to toolbar