wordpress 字段_如何在WordPress中删除默认作者个人资料字段

wordpress 字段

Upon the release of WordPress 2.9, we shared with you an article that shows you how to add fields like twitter and facebook to author profile page. In this article we will show you how you can remove unwanted default author profile fields to make WordPress admin panel more user friendly for your clients.

在WordPress 2.9发行后,我们与您分享了一篇文章,向您展示了如何将Twitter和Facebook之类的字段添加到作者个人资料页面 。 在本文中,我们将向您展示如何删除不需要的默认作者个人资料字段,以使WordPress管理面板对客户更友好。

How to Remove Default Author Profile Fields in WordPress

As you can see, we do not want to keep AIM, Yahoo IM, and Jabber/Gtalk. If you are dealing with very new level clients, then you do not want them to see this. It will only complicate things for them. To remove these default fields simply open your theme’s functions.php file and add the following code:

如您所见,我们不想保留AIM,Yahoo IM和Jabber / Gtalk。 如果您要与非常新的客户打交道,那么您不希望他们看到这一点。 它只会使他们的事情复杂化。 要删除这些默认字段,只需打开主题的functions.php文件并添加以下代码:


    <?php
    add_filter('user_contactmethods','hide_profile_fields',10,1);

    function hide_profile_fields( $contactmethods ) {
    unset($contactmethods['aim']);
    unset($contactmethods['jabber']);
    unset($contactmethods['yim']);
    return $contactmethods;
    }
    ?>

This will remove the contact methods like AIM, Jabber, and Yahoo IM. Now if you want to add fields then you should check out our article that talks about adding author profile fields in WordPress.

这将删除诸如AIM,Jabber和Yahoo IM之类的联系方式。 现在,如果您想添加字段,那么您应该查看我们的文章,该文章讨论了在WordPress中添加作者个人资料字段

Source: Strangework by Brad Williams

资料来源: 布拉德·威廉姆斯的《怪异作品》

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-remove-default-author-profile-fields-in-wordpress/

wordpress 字段

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值