テンプレートタグ/the author ID

出典: WordPress Codex 日本語版

  • 書式: <?php the_author_ID(); ?>
  • 説明: 登録時に割り振られた投稿者のユーザーID(数字)を出力。
  • 位置: ループ内
  • 引数: なし
  • コード記述例: <li class="author-<?php the_author_ID(); ?>"><?php the_author_nickname(); ?></li>
  • 出力例: <li class="author-1">WebMaster</li>
他の言語