<!-- Twitter Card --> <meta name="twitter:card" content="summary"> <?php if (is_singular()){//投稿・固定ページの場合 if(have_posts()): while(have_posts()): the_post(); echo '<meta name="twitter:description" content="'.mb_substr(get_the_excerpt(), 0, 100).'">';echo "\n";//抜粋を表示 endwhile; endif; echo '<meta name="twitter:title" content="'; the_title(); echo '">';echo "\n";//単一記事タイトルを表示 echo '<meta name="twitte
![プラグイン不要でTwitterカードをコピペでサクッと設置する方法|WordPressカスタマイズ](https://cdn-ak-scissors.b.st-hatena.com/image/square/aa43dd301d40aea602f3c729aec1b546d5c392fe/height=288;version=1;width=512/https%3A%2F%2Fnelog.jp%2Fwp-content%2Fuploads%2F2017%2F03%2FTwitter-1.jpg)