Skip to:
Content
Pages
Categories
Search
Top
Bottom

wrap user profile template into a shortcode


  • Gabe462
    Participant

    @gabe462

    I thought it might be simple to create a static page to display the current user’s profile. I found BP_Members_Theme_Compat::single_dummy_content() returning
    /bp-nouveau/buddypress/members/single/home.php and tried to call that in my shortcode function. That didn’t work, because BP hadn’t been told which user I was looking for. I tried an experiment:

    add_filter( 'bp_get_displayed_user', function ( $user ) { 
        return ( is_null( $user ) ) ? wp_get_current_user() : $user;
    } );

    which failed. I think what I’m really needing to understand is how to actually load buddypress where it’s not already being started up.

    So I’d like to know:

      How to initialize BP in a place where it isn’t already
      a better informed approach for placing the user profile on an actual page

    Maybe someone’s already made this a plugin that I can pick apart?

    Thanks

  • You must be logged in to reply to this topic.
Skip to toolbar