WordPress.org

Ready to get started?Download WordPress

Forums

How to get RSS feed name to display category name? (3 posts)

  1. deko
    Member
    Posted 7 years ago #

    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.

  2. deko
    Member
    Posted 7 years ago #

    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

    ???

  3. deko
    Member
    Posted 7 years ago #

    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?

    ???

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags