WordPressテーマJIN:Rの記事一覧の下方にある、「もっと見る」ボタンの文字を変えてみましたのでメモします。
[point_maker type=”simple_icon” base_color=”pearl_gray” title_icon=”info-circle-solid” title_color_background=”true” title_color_border=”true” content_type=”text” content_color_background=”false” content_color_border=”true” block_editor=”true”]
カスタマイズは慎重に行なってくださいね。
[/point_maker]<script>
document.addEventListener("DOMContentLoaded", function() {
var moreLink = document.querySelector(".a--postlist-more a");
if (moreLink) {
moreLink.textContent = "Read More";
}
});
</script>
こちらのJSになります。
jQueryバージョンも2通り下に書いておきますね。どちらでも同じ内容です。
(function(jQuery) {
jQuery('.a--postlist-more a').text('Read More');
})(jQuery);
または
(function($) {
$('.a--postlist-more a').text('Read More');
})(jQuery);
サイトをゆめかわいいデザインにしてしまいました。色々アレンジできるのも楽しいですね!