LoginSignup
0
0

More than 1 year has passed since last update.

WordPressの投稿者情報をget_the_author_meta()関数で取得する

Posted at

WordPressの投稿者情報を取得するためには

<?php get_the_author_meta( $field, $user_id ); ?>

で取得できる. $fieldは必須引数で$user_idはオプショナル.$user_idが指定されない場合,現在のユーザーが取得される.

$field

$fieldは管理画面が日本語なので指定方法がわからかった. $fieldは下記で指定する

ID
user_nickname       | ニックネーム
user_email          | メール
user_url            | サイト
user_description    | プロフィール情報
user_firstname      | 名
user_lastname       | 性

参考にしたサイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0