まずはキーワードはここでエンコード
エンコードしたものにこれをつける
1 | https: //news.google.com/news/rss/search/section/q/【キーワード】/【キーワード】?hl=ja&gl=JP&ned=jp |
1 | https: //news.google.com/news/rss/search/section/q/%E5%A4%9A%E6%91%A9%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%BF%E3%82%A6%E3%83%B3?hl=ja&gl=JP&ned=jp |
WP RSS Aggregator(作者: RebelCode)をインストールし
Feed SoucesにURLを貼る
※プラグイン名:RSS Aggregator – RSS Import, News Feeds, Feed to Post, and Autoblogging
1 | <?php echo do_shortcode( '[wp-rss-aggregator]' ); ?> |
そして表示させたいところに上記を書く
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | .newsfeed{ max-width : 1000px ; margin : 0 auto ; } .feed-source,.feed-date{ font-size : 0.75em ; color : #222222 ; } .newsfeed h 4 { font-size : 24px ; line-height : 30px ; font-family : "ヒラギノ明朝 Pro W6" , "Hiragino Mincho Pro" , "HGS明朝E" , "MS P明朝" , serif ; font-variant : normal ; font-weight : bold ; letter-spacing : 2px ; text-align : center ; margin : 40px 0 20px 0 ; padding-bottom : 6px ; border-bottom : 2px solid #0072ff ; } |