是否可以为 buddypress 制作一个自定义页面,其网址如下:http ://domain.com/custom_page ?我通过搜索谷歌找到了一些答案,但它没有创建自定义页面。我有一个代码,我在其中一个博客中找到。
定义(“BP_FUN_SLUG”,“有趣”);
功能 bp_show_fun_page() {
global $bp, $current_blog;
if ( $bp->current_component == BP_FUN_SLUG && $bp->current_action == '' ) {
// The first variable here must match the name of your template file below
bp_core_load_template( 'fun', true );
}
}
add_action('wp','bp_show_fun_page',2);
但是这段代码不起作用......有没有人知道如何做到这一点?谢谢