WordPressで企業ページのようなホームページを作成していく中で、トップページに「新着情報」のような欄を作成してニュース記事を並べたいと思ったことはありませんか?
PHPを書き換えたりすれば簡単にそういった欄を作成可能なのですが、最も簡単にニュースフィードを作成できるやり方をお教えします。
—
① News記事用のカテゴリーを作成する。
投稿>カテゴリー で「news」という名前のカテゴリーを作成します。
ついでに「新規追加」から新着情報に載せたい記事をいくつかnewsカテゴリー設定で書いておきましょう。
② newsのRSSフィードを取得する。
http://XXXXXXX.com/category/news/feed
xxxの部分は作成しているサイトのドメインです。これでnewsの記事RSSフィードが取得できました。
あとはこのフィードをトップページに表示させるだけとなります。
サイドバーに新着情報を表示するのであれば、RSSウィジェットに上記のRSSフィードを挿入すれば完了です。
③ でもサイドバーじゃなくて、トップページに入れたいよ?
そんなときは、サイドバー用のウィジェットを固定ページに挿入できるようになる「Page Builder」というプラグインが非常に便利。
このPage Builder、直観操作で固定ページ内をどんどんカスタマイズできる優れもの。
カラムデザインなども自由自在です。Page Buliderの使い方や優れた機能の説明は別の記事でお話しするとして、これでRSSウィジェットをトップページに挿入可能になります。
基本的な使い方はこちらをご参考ください。→http://wp-themetank.com/wordpress-plugin-responsive-page-builder/
Written by 中島
Cookie | 期間 | 説明 |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |