WordPress 启用最受欢迎的社交网络
示例
function social_profiles( $contactmethods ) {
$contactmethods['facebook_profile'] = 'Facebook Profile URL';
$contactmethods['twitter_profile'] = 'Twitter Profile URL';
$contactmethods['google_profile'] = 'Google Profile URL';
$contactmethods['linkedin_profile'] = 'Linkedin Profile URL';
$contactmethods['github_profile'] = 'GitHub Profile URL';
$contactmethods['behance_profile'] = 'Behance Profile URL';
$contactmethods['dribbble_profile'] = 'Dribbble Profile URL';
$contactmethods['stack_profile'] = 'Stack Exchange Profile URL';
$contactmethods['twitch_profile'] = 'Twitch Profile URL';
$contactmethods['angellist_profile'] = 'AngelList Profile URL';
return $contactmethods;
}
add_filter( 'user_contactmethods', 'social_profiles', 10, 1);您将在仪表板中获得以下文件:
这就是您在代码中检索它的方式
<?php $user_stack_exchange = get_the_author_meta( 'stack_profile' ); ?>
热门推荐
1 如何训练狗狗不叫
2 训练狗狗不叫
3 训练狗狗随行
4 怎么训练狗狗不叫
7 训练比熊狗狗教程
10 上海狗狗训练
11 怎么训练狗狗上厕所
12 训练狗狗趴下
13 狗狗服从训练
14 训练狗狗拒食
15 训练狗狗笑
16 训练狗狗大便
17 训练狗狗立
18 训练狗狗捡东西