Skip to:
Content
Pages
Categories
Search
Top
Bottom

Calling the function or class that displays the user profile


  • jonmojo
    Participant

    @jonmojo

    Hello all,

    I’m trying to create a shortcode to that calls the user profile (bp_loggedin_user_domain()), but not its link – The actual function call – so it can display within a tab on a page (Intense shortcodes).

    I may be being a bit dense, but I’ve been unable to find a way to call the raw user profile without redirect to bp_loggedin_user_domain(), that doesn’t also includes the theme’s header, footer, etc. I just want the raw HTML that makes up the BuddyPress user profile.

    I guess I’m looking for what parses <site URL>/members/<username>/ or whatever it calls.

    Thanks,

    Jon.

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

  • danbp
    Moderator

    @danbp

    Hi,

    try bp_get_loggedin_user_link()

    More here: http://hookr.io/plugins/buddypress/#index=g&search=loggedin_user


    jonmojo
    Participant

    @jonmojo

    Thanks Dan,

    That returns the same link as bp_loggedin_user_domain() – or http://<my site>/members/jon/ – in reality.

    I’m looking to return the raw HTML for the page or template output, not a link, when applied to:

    function bp_goto_profile_html() {

    return bp_get_loggedin_user_link();
    }

    add_shortcode(‘bp_goto_profile’, ‘bp_goto_profile_html’);

    Thanks,

    Jon.


    shanebp
    Moderator

    @shanebp

    Please use the code button when sharing code.

    Take a look at
    buddypress\bp-templates\bp-legacy\buddypress\members\single\profile.php
    to see how files and functionality and html is loaded for profiles.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar