JPF Category Feeds Wordpress Plugin

November 4th, 2006 · 26 Comments · 9,695 views

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

Name: JPF Category Feeds WordPress Plugin [Download]
Size: 1,12 kBytes
FileType: .zip-File
Edited on 03. Mar 2007 - 15:54 h
Downloads: 707
Free for visitors

Subscribe to So Joe... Today!

26 responses so far ↓

Leave a Comment