Forums

[resolved] Multiple (but not all) category feed in PHP (5 posts)

  1. aelfa
    Member
    Posted 5 years ago #

    Hello,
    On the forum, I see how to create a multiple-category feed through a URI: your.site.com/index.php?feed=rss2&cat=3,8,14

    I would like to link to a feed only containing certain categories, but I don't know PHP. How would I apply the concept above to my template code?

    <a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>">
    <img src="<?php bloginfo('template_url'); ?>/img/feed.gif" alt="RSS Feed" title="RSS Feed" width="56" height="26" border="0" id="feed" />
    </a>

    Thank you!

  2. Otto
    Tech Ninja
    Posted 5 years ago #

    Just add the link in somewhere:

    <a href="http://your.site.com/index.php?feed=rss2&cat=3,8,14">Link to category RSS feed</a>

  3. aelfa
    Member
    Posted 5 years ago #

    Would the link replace <a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"> in my template?

    Thanks!

  4. Otto
    Tech Ninja
    Posted 5 years ago #

    If you wanted it to replace that bit on your page, then yes. If you don't, then no. :)

    It's really up to you as you how you want your page to look.

  5. aelfa
    Member
    Posted 5 years ago #

    Thank you for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags