Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'bp_setup_nav', 'bboss_add_bpnav' );
- function bboss_add_bpnav(){
- $bp = buddypress();
- bp_core_new_nav_item( array(
- 'name' => __( 'About', 'TEXTDOMAIN' ),
- 'slug' => 'about',
- 'parent_url' => $bp->loggedin_user->domain . $bp->slug . '/',
- 'parent_slug' => $bp->slug,
- 'screen_function' => 'bboss_bpnav_screen',
- 'position' => 40 ,
- 'default_subnav_slug' => 'about-me',
- ) );
- bp_core_new_subnav_item( array(
- 'name' => __( 'About Me', 'TEXTDOMAIN' ),
- 'slug' => 'about-me',
- 'parent_url' => $bp->loggedin_user->domain . $bp->slug . '/' . 'about/',
- 'parent_slug' => 'citations',
- 'screen_function' => 'bboss_bpnav_screen',
- 'position' => 11,
- 'item_css_id' => 'about-me',
- ) );
- }
- function bboss_bpnav_screen(){
- add_action( 'bp_template_title', 'bboss_bpnav_screen_title' );
- add_action( 'bp_template_content', 'bboss_bpnav_screen_content' );
- bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
- }
- function bboss_bpnav_screen_title(){
- _e( 'About', 'TEXTDOMAIN' );
- }
- function bboss_bpnav_screen_content(){
- //screen content
- echo "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent placerat ac justo eget euismod. Curabitur a pretium sapien. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vulputate finibus metus, ac dapibus massa venenatis a. Sed pretium fringilla quam, quis sollicitudin sapien tincidunt nec.</p>";
- }
Add Comment
Please, Sign In to add comment