12
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WordPressのRSSフィードまとめ

Last updated at Posted at 2013-11-26

よく利用するRSSの形式を一覧でまとめ。
最近良く、ECサイトとの連動で記事のRSSを引いたりするので。基本のRSS2.0。
取得数はカスタマイズしていな限り、
「設定」⇒「表示設定」の「RSS/Atom フィードで表示する最新の投稿数」で決まる。(デフォルトは10件)

基本

新着記事を取得

http://example.com/?feed=rss2

カテゴリ

指定のカテゴリ記事を取得する方法(カテゴリ番号「1」の記事を取得)

http://example.com/?feed=rss2&cat=1

複数のカテゴリ記事を取得する方法(カテゴリ番号「1」と「2」の記事を取得)
カンマで区切ります。

http://example.com/?feed=rss2&cat=1,2

指定のカテゴリ記事を除外する方法(カテゴリ番号「1」の記事を取得しない)
カテゴリ番号の前に「-(マイナス)」記号を入れます。

http://example.com/?feed=rss2&cat=-1

カテゴリ名で取得する方法。あんまり使わないかも。

http://example.com/category/categoryname/?feed=rss2

タグ

指定のタグ設定記事を取得する方法
複数の場合はカテゴリと同様にカンマで区切る。

http://example.com/?feed=rss2&tag=windows,linux,mac

こちらもカテゴリと同様にタグ名で取得する方法。う~ん、あんまり使わないかも。

http://example.com/tag/tagname/?feed=rss2

記事

指定の記事を取得する方法
記事はカンマで区切って複数取得できないみたい。

http://example.com/?feed=rss2&p=1

検索結果

検索結果で得た記事を取得する方法

http://example.com/?feed=rss2&s=美味しい料理

GETパラメータを組み合わせて、Feed取得できるみたい。(カテゴリ3番のタグ「windows」とか)

http://example.com/?feed=rss2&cat=3&tag=windows

必要が出てきたら追記しよー。

12
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?