storkの関連記事プラグインYARPPでエラーが出た時の対処法(yarpp-template-relative.php on line 35)

WordPressテーマ「stork」を使っていて、関連記事プラグインYARPPでエラーが出た時の対処法(yarpp-template-relative.php on line 35)をメモ。

OPEN CAGEさんのWordPressのテーマSTORKを気に入って使ってます。

で、運営中の別サイトで関連記事のプラグインYARPPをつかって表示させているんですが、なにやらこんな表示が。

Warning: Use of undefined constant … – assumed ‘…’ (this will throw an Error in a future version of PHP) in /home/hogehoge/hogehoge.com/wp-content/themes/jstork_custom/yarpp-template-relative.php on line 35

画像は同じテーマと同じプラグイン使ってるサイトから拝借。

意味としては、未定義の関数が使われてるよ的な感じで、phpのバージョンを7以降にすると起こる模様。

シングルクォーテーションで囲ってやればOKです。

該当の箇所はココ↓

echo $title. … ;

35行目末尾らへんにある「 … 」をシングルクォーテーションで囲ってやればOKです。
↑画像のは修正済みの状態。

echo $title. '…' ;

これでOK。のはず。

シェアしてもらえたら喜びます

CTA
CTAサンプル