Kategori Feed Level – Blog Optimization

Blog optimization – Feed Level – Komunitas Blogger Bali

Categories are automatically included for each post in your feed, but you can also add feed level categories which act as meta information for your entire blog. You need to manually edit your feed file to accomplish this. Don’t worry, it’s not hard.

Find the wp-includes folder in the root directory of your blog’s file structure. For example, this blog’s wp-includes folder is located at: http://www.closed-loop-marketing.com/blog/wp-includes. You will find the .php files you need to edit in this folder.

For RSS 2 (WordPress default):

Open the feed-rss2.php file for editing. You can insert multiple categories. Each category uses a start and end tag. For example:

<category>Giant Spiders</category>

<category>Arachnid Diaries</category>

These categories just need to be placed after the opening <channel> element but before the opening <item> element. If in doubt, place them just after the feed <title> element like this:

<channel>

<title>The CLM Blog</title>

<category>Category 1</category>

<category>Category 2</category>

For Atom:

Open the feed-atom.php file for editing. The Atom category syntax is different from RSS 2. Example:

<category term=”Squid Food” />

<category term=”Shrimp” />

For Atom, these categories need to be placed after the opening <feed> element but before the opening <entry> element. Again, a good place is directly after the feed <title> element. So an example might be:

<feed xmlns=http://www.w3.org/2005/atom …[various other cryptic writings]…>

<title type=”text”>The CLM Blog</title>

<category term=”Category 1″ />

<category term=”Category 2″ />

Both RSS 2 and Atom feed-level categories allow for extra attributes or elements within the <category> element. Read more about feed categories in the RSS 2 spec and the Atom spec.

]]]]]]]]]]]]]]]]]]]]]]]]

2 Post Dalam Kateogori yang Sama :

Lebih Banyak Di Blog Tips Trik

]]]]]]]]]]]]]]]]]]]]]]]]

Advertisements

One Response

  1. […] are a variety of arguments in favor of full text feeds, as opposed to partial text feeds. I tend to agree with the full text arguments, and the […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: