【发布时间】:2018-12-09 18:19:25
【问题描述】:
我正在尝试为所有 WordPress 用户创建一个用户个人资料页面,以便访问者可以看到每个用户的个人资料及其基本信息。
user 是原生 Author 不是自定义帖子类型
例如:我的自定义用户个人资料链接
https://myexample.com/user/joe/---- 将显示乔的个人资料
https://myexample.com/user/jhon/---- 将显示 jhon 的个人资料
但我的代码仅适用于管理员/作者有什么方法可以显示
<?php
$ID = the_author_meta('ID');
$first_name = the_author_meta('first_name');
$last_name = the_author_meta('last_name');
$user_fullname = $first_name . ' ' . $last_name;
$nickname = the_author_meta('nickname');
$branch_code = the_author_meta('branch_code');
$index_no = the_author_meta('index_no');
$sp_designation = the_author_meta('sp_designation');
$description = the_author_meta('description');
$mobile_number = the_author_meta('mobile_number');
$user_email = the_author_meta('user_email');
?>
谁能帮我解决这个问题?
【问题讨论】: