投稿記事のメールアドレス、ウェブサイトなどを表示するテンプレートタグ
WordPressで、投稿記事のメールアドレス、ウェブサイトなどの投稿者情報を表示するテンプレートタグは次の通りです。
①メールアドレスを表示
<?php the_author_email(); ?>
②ウェブサイトを表示
<?php the_author_url(); ?>
③AIM アドレスを表示
<?php the_author_aim(); ?>
④Yahoo メッセンジャーを表示
<?php the_author_yim(); ?>
⑤投稿記事数を表示
<?php the_author_posts(); ?>
⑥投稿者ページへのリンクを表示
<?php the_author_posts_link(); ?>
⑦ユーザーについてを表示
<?php the_author_description(); ?>
投稿者名、自己紹介、サイトアドレスを表示したいときは、次のように記述します。
<?php if(have_posts()):while(have_posts()):the_post(); ?>
投稿者名: <?php the_author(); ?>
自己紹介: <?php the_author_description(); ?>
サイト : <?php the_author_url(); ?>
<?php endwhile;endif; ?>
-スポンサーサイト-
トラックバック URL :


コメントはございません。