JPF Category Feeds WordPress Plugin

The JPF Category Feed plugin allows you to easily list the RSS category feeds for your post. It is quite flexible, allowing a number of parameters that can derive horizontal and vertical listings or even ‘sentence’ form. Installation is simple, copy the jpf_catfeed.php file to your WordPress plugins folder and activate in your Plugins Management tab. The optional rss.gif file can be copied anywhere in your site, and can be referred to as specified below. Then, place the following code in ‘the loop’:
<?php jpf_catfeed([Image], [Images], [Before], [After], [Separator], [And]); ?>

  • Image is the path to an image that will preceed the list. The image is not linked to anything, it is simply decorative.
  • Images is an image that will preceed each category link, the image is included as part of the link.
  • Before is anything you want to preceed each category link, commonly this would be used to define each category as a line item in a list, or to define CSS, but could also be brackets or other symbols.
  • After would typically be used to close a tag that was opened with Before
  • Separator is the text you want to separate the category links, most commonly a comma and space, or a vertical bar.
  • And defines if you want the word ‘and’ followed by a space to separate the last two items, generally used if you are listing the categories in a sentence format. Set to true if you wish to use.

If you simply include <?php jpf_catfeed(); ?> you will get a line of your categories separated by a vertical bar (eg. “category1|category2|category3″).

Here are some examples of it’s use:


In this example, wrapping the function in an unordered list, and specifying $before = ‘<li>’ and $after = ‘</li>’ will give you a simple unordered list of your categories.

<ul><?php jpf_catfeed(”,”, ‘<li>’, ‘</li>’); ?></ul>

category1
category2
category3


Here an icon is included before each link. The icon is part of the hyperlink to that category.

<?php jpf_catfeed(”,’/wp-images/icons/rss.gif’, ”, ”, ‘, ‘); ?>

RSS category1, RSS category2, RSS category3


Here the separator is changed to a vertical bar with a space on each side instead of a comma followed by a space.

<?php jpf_catfeed(”,’/wp-images/icons/rss.gif’, ”, ”, ‘ | ‘); ?>

RSS category1 | RSS category2 | RSS category3


Here an icon is included before the first category, a comma and space is used to separate the items, and the last category is preceeded by ‘and’ instead of a comma.

<?php jpf_catfeed(‘/wp-images/icons/rss.gif’,”, ”, ”, ‘, ‘, true); ?>

RSS category1, category2 and category3

Posted: 06 November 4
Under: Wordpress
Viewed: 10,946 views

28 Responses to “JPF Category Feeds WordPress Plugin”

  1. milo says:

    If it’s good, why you don’t use it? Just wondering…

  2. Joe says:

    Funny you should ask. I’ve been slowly moving things around on my site, and I develped the plugin as part of that move. It will be appearing in my site very soon, as I introduce a frame that has feeds from post comments, post categories, and all posts on the site…

  3. [...] JPF Category Feeds WordPress Plugin | So Joe… Выводит Ñ?пиÑ?ок RSS лент длÑ? рубрик текущего поÑ?та. (tags: rss рубрики wordpress плагин) [...]

  4. Ezio says:

    Hello Joe,
    I have installed your plugin but it’s not working in my site.
    Apart from installing your plugin do I have to make any changes
    somewhere else?
    Your help would be appreciated.
    Thanks,
    Ezio.

  5. Joe says:

    You shouldn’t have to make any changes to your templates beyond the line to all the function as I’ve described above. For example, to get mine (in the ‘Upate Notifications’ box on the top right) I put <?php jpf_catfeed('','/wp-images/icons/rss.gif', '<li>', '</li>'); ?> in my sidebar. What did you put in and where did you put it? In your comment back, but <code> before your code and </code> after your code so it shows up here properly.

  6. Ezio says:

    Hi Joe,
    this is the code:
    ', ''); ?&gt;

    and I put it in the sidebar

  7. Ezio says:

    sorry the code didn’t come out:

    
    ', ''); ?&gt;
    

  8. Joe says:

    Not sure why your code isn’t showing up in the comment, and my e-mail to you was rejected. It seems to work fine in both my sidebars. Are you looking at it on a post, or on your home page? If you put it in your sidebar, it won’t work properly on a non-single page as their would be more than one post available (I’m guessing you’d see the feeds for the last post, but not sure). I have mine in my sidebar, but I have it set to only show up if it’s a single page (one post). You can do this by using this code

    
    <?php if (is_single()) { ?>
    <ul>
          <?php jpf_catfeed('','/wp-images/icons/rss.gif', '<li>', '</li>'); ?>
    </ul>
    <?php } ?>
    

    If you try posting your code again, use [ and ] instead of < and >, maybe it will work (though as you can see above, my code is appearing without problem).

  9. MazZziKa MazZziKa, Sr. says:

    can u widget it plz

  10. MazZziKa MazZziKa, Sr. says:

    Then, place the following code in ‘the loop’:

    where to add it ?

  11. Joe says:

    Anywhere you want the link to appear. I have mine in my sidebar, and it seems to work fine there, but between your post and the comments is probably a more typical spot.

  12. Dr.Mazika Dr.Mazika says:

    i will use it in my sidebar but i have alot of themes as i use it for wpmu so can u widget it

  13. : Webzone says:

    [...] Category-feed – Κάθε κατηγοÏ?ία έχει ξεχωÏ?ιστό feed και έτσι μποÏ?είτε να “κάψετε” στο feedburner μόνο την κατηγοÏ?ία με τα podcast. Tags:Blogs plugins.mp3 Podcast Tutorials [...]

  14. snakey says:

    Hi, if I want to list only specific categories (not all), how do I do that? Thanks

  15. Joe says:

    Their’s probably some way to modify the plugin to do that, but it can’t by default, and I wouldn’t know how to make it work. Sorry.

  16. [...] Allows user to list feeds for the categories the current post is in. Author: Joseph Fieber Plugin Page Attached [...]

  17. Lincoln says:

    This is a great idea for a plugin, but unfortunately when I tried to use it, it would only display one category feed, which was based on what category my latest post happened to be in. Weird. Oh well, guess I’ll have to do it manually. :-(

  18. tiagotb says:

    Thanks! Very good plugin =)!

  19. Scott CLark says:

    Couldn’t get this working with 2.1.2 WordPress, even after taking your exact code as a test case. Insertion into sidebar.php. Has this been tested with 2.1.2?

  20. [...] JPF Category Feeds – Lists the feed URLs of the current post’s categories in the sidebar. [...]

  21. [...] JPF Category Feed 是一個�以讓你輕鬆列出文章分類feed的�件。 [...]

  22. [...] JPF Category Feed 是一个�以让你轻�列出文章分类feed的�件。 [...]

  23. manele says:

    Thank u so much!

  24. [...] JPF Category Feeds WordPress Plugin adiciona links de feed por [...]

  25. [...] JPF Category Feed ???????????????feed???? [...]

  26. [...] JPF Category Feed ???????????????feed???? [...]

Leave a Reply