【发布时间】:2014-04-09 00:36:54
【问题描述】:
在 buddypress 中,您可以将会员资料字段添加到会员标题中,以便在他们的用户头像旁边。在 buddypress member-header.php 中,该部分被注释掉,如下所示:
<?php
/***
* If you'd like to show specific profile fields here use:
* bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
*/
do_action( 'bp_profile_header_meta' );
?>
这是我将其更改为添加配置文件字段数据“位置”:
<?php
bp_member_profile_data( 'field=location’ );
do_action( 'bp_profile_header_meta' );
?>
我使用的这段代码给了我一个 T_STRING 错误作为回报。我没有 PHP 经验,所以我认为这很容易解决,因为 wordpress 开发人员实际上已经说明了如何使用此功能。
感谢任何帮助。
【问题讨论】:
标签: php wordpress buddypress