Skip to:
Content
Pages
Categories
Search
Top
Bottom

Use a BP legacy template in a child theme

  • Avatar of yannlossouarn
    yannlossouarn
    Participant

    @yannlossouarn

    Hello,

    I use WP3.6+BP1.8.1 at http://fablab-lannion.org.

    I would like to display the equivalent of the /members/LOGIN/activity page for logged-in users that access to the home page. I copied various templates from /buddypress/members/single/ (activity.php, home.php…) and created a shortcode function that makes the following call :

    include( locate_template( array( '/buddypress/members/single/home.php' ), false ) );

    The template is loaded but inside of it, calls to various functions like bp_get_displayed_user_nav() return nothing. It seems that $bp->displayed_user data (especially domain and userdata) are empty, which seems to be a possible cause. Is there something I could do to force BP to load appropriate data about the logged-in user in this context ?

    Best regards,
    Yann

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of yannlossouarn
    yannlossouarn
    Participant

    @yannlossouarn

    +1 :?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Not really getting what you are trying to do here so try and explain your page path again. I create pages from time to time to act as a sort of hub page for logged in user displaying their data but these need to use loops as explained in the codex and pass ID’s as bp_loggedin_user_id() amongst other things.

    Avatar of yannlossouarn
    yannlossouarn
    Participant

    @yannlossouarn

    Hello,

    In fact I’d like to have two distinct behaviours for people who visit http://fablab-lannion.org home page :
    – simple visitors should show the carrousel
    – logged-in users should show a personal, customized view, that would notably contain a filtered activity flow that concern them.

    Is that more clear ?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Then as I said start by looking at the codex documentation and activity loops to se how to add a custom activity loop with parameters for loggedin user, in fact examine the user account activity loop as that is a personalised view.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.