記事情報だけが欲しいのに、サイドバーやヘッダー・フッターなどのデータも毎回読み込むから表示も遅い。 そこで本稿で紹介したいのは「Infinite Scroll」です。 これを実装すれば、ページ遷移せずに過去の記事を読み込むことが出来るので、過去の記事をサクサクっと呼び出せるようになります。 コードも短く、JavaScriptが苦手な人でもカンタンに実装できるので初心者にもオススメです。 デモページはこちら Infinite Scrollのデモページ アーカイブページのHTML要素を確認 archive.php、category.php、taxonomy.phpなど、記事の一覧を表示するテンプレートファイルを編集します。 必要に応じて、実装したいページに同じ変更を加えてください。 念の為、ファイルをコピーして「category_backup.php」など名前を変えてバックアップしてくださいね