从Wordpress网站链接到Buddypress配置文件

时间:2015-08-13 17:09:54

标签: buddypress

我尝试从Wordpress页面编辑器链接到Buddypress配置文件。 我安装了'Insert PHP v1.2'来使用php,但我仍然没有得到它。实际上我在Wordpress页面中执行了以下步骤:

[kleo_h3]Fügeweitere[kleo_colored_text color =“#F00056”] Fotos [/ kleo_colored_text] zu deinem Profil hinzu。[/ kleo_h3]

[rtmedia_uploader]

[insert_php]

& var = bp_loggedin_user_domain();

echo do_shortcode('[kleo_button url =& var style =“standard”size =“small”round =“round”icon =“{fontawesome-icon,after”target =“_ self”] Profil [/ kleo_button] “);

[/ insert_php]

但程序很糟糕。我如何将该URL插入短代码?

1 个答案:

答案 0 :(得分:0)

终于明白了:

[kleo_h3]Fügeweitere[kleo_colored_text color =“#F00056”] Fotos [/ kleo_colored_text] zu deinem Profil hinzu。[/ kleo_h3]

[rtmedia_uploader]

[insert_php]

// $ var = bp_core_get_userlink(bp_loggedin_user_id());

$ id = bp_loggedin_user_id();

$ name = bp_core_get_user_displayname($ id);

$ url = site_url()。“/ members / $ name”;

echo do_shortcode('[kleo_button url ='。$ url。'style =“standard”size =“small”round =“round”icon =“{fontawesome-icon,after”target =“_ self”] Profil [ / kleo_button]');

[/ insert_php]