Hi George,
You can access the page id as following$page_id = groups_get_groupmeta( bp_get_current_group_id(), 'bpge' );
Then simply a get_post() on that and echoing the $post->post_content will be enough.
Hope that helps.
Hi George,
here is the snippet you can use in your front page$page_id = groups_get_groupmeta( bp_get_current_group_id(), 'bpge' ); if( $page_id ) { $post = get_post( $page_id ); //echo get_the_title( $post ); //uncomment for title echo apply_filters( "the_content", $post->post_content ); }
Hope that helps.
I can’t get this to work, could you explain what it is doing? I think it is looking for a page called “bpge” under the current group id and then displaying its content but I’m not sure.
I set changed the name of the Extras page to be the same but it showed no output, not event an error code.
Hi George,
1. It looks for the the current page( custom post type) associated with group. If it finds an ID, then it tries to display the content.
‘bpge’ is a meta key and has nothing to do with the page slug. BP Extras uses it to store the associated page id. Please try debugging it by doing some print_r on the ID/post etc.
You must be logged in to reply to this topic.