Buddypress: New Tab and Page (Members Profile)

I want to add some pages/tabs to the user's buddypress profile.

I'm using the following function to get at least one page working:

function my_bp_nav_adder() {
    global $bp;
    bp_core_new_nav_item(
            array(
                    'name'                => __( 'Listings', 'buddypress' ),
                    'slug'                => 'my-listings',
                    'position'            => 1,
                    'screen_function'     => 'listingsdisplay',
                    'default_subnav_slug' => 'my-listings',
                    'parent_url'          => $bp->loggedin_user->domain . $bp->slug . '/',
                    'parent_slug'         => $bp->slug
            ) );
}

function listingsdisplay() {
    //add title and content here - last is to call the members plugin.php template
    add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' );
    add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' );
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

function my_groups_page_function_to_show_screen_title() {
    echo 'My new Page Title';
}

function my_groups_page_function_to_show_screen_content() {
    echo 'My Tab content here';

}

add_action( 'bp_setup_nav', 'my_bp_nav_adder', 50 );

(found here)

But if I rename my-listings, I get a "404 page not found". I would like to have this called "Bookmarks"

And how can I create more pages and menu tab items by using this function?



Source: Buddypress: New Tab and Page (Members Profile)
By: http://wordpress.stackexchange.com/users/77898
From: StackExchange Network

How to get custom profile fields in a user list from an ACF user field?

I have a custom user field built with ACF which allows me to select a number of users. Then I call that list of users, with their display names, a link to their profiles (via author.php) and their bio.

This is the code I have, which works, except it doesn't print a custom ACF field (my_field) which I have in the user's profile:

<?php
$values = get_field( 'execs','options' );
if ( $values ) {
$execs = array();
foreach ( $values as $value ) {
$link = get_author_posts_url( $value['ID'] ); //get the url
$nicename = $value['display_name'];
$userdesc = $value['user_description'];
 $position = get_field( $value['my_field'] ); // custom ACF field
$execs[] = sprintf( '<li><a href="%s">%s</a><small>%s</small><p>%s</p></li>', $link,  $nicename, $position, $userdesc ); //create a link for each author
}

echo '<h4>Executive Committee</h4>';
echo '<ul>';
echo implode( $execs );
echo '</ul>';
}
?>

How can I also make the custom profile field appear in this listing? Any help would be much appreciated!

Thanks!



Source: How to get custom profile fields in a user list from an ACF user field?
By: http://wordpress.stackexchange.com/users/51936
From: StackExchange Network

Banner for Fresh and Clean Theme Help

I was wondering if anyone knew how to make the banner just one image instead of the 2 separate banners for the fresh and clean wordpress theme.

Any help on this would be great.



Source: Banner for Fresh and Clean Theme Help
By: http://wordpress.stackexchange.com/users/78821
From: StackExchange Network

How to include a php file in every post and page

How to automatically include a php file in all posts and pages. The php file I want to add has a script which will automatically fetches a temporary video link every time the file is executed.



Source: How to include a php file in every post and page
By: http://wordpress.stackexchange.com/users/68685
From: StackExchange Network