This topic has 4 replies, 2 voices, and was last updated 9 years by Norman.

  • Author
  • #46918
     Norman
    Participant

    is there a shortcode for the logged in user ?

    i am working on some profile badges. user should be able to promote their buddypress profile outside of wordpress, therefore i have a short piece of code that
    includes the user profile page link, and the username needs to be a the one that is currently logged in

    #46929
     sharmstr
    Moderator

    https://codex.buddypress.org/developer/playing-with-the-users-id-in-different-contexts/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #46930
     sharmstr
    Moderator

    Sorry, wrong link https://codex.buddypress.org/developer/the-bp-global/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #46932
     Norman
    Participant

    thx !

    #46977
     Norman
    Participant

    after trying some things I recommend this plugin:

    https://wordpress.org/plugins/user-shortcodes/

    after installing the plugin you can easily use
    6 shortcodes:

    [currentuser_username]
    Display the current user name
    [currentuser_useremail]
    Display the current user email
    [currentuser_displayname]
    Display the current user display name
    [currentuser_firstname]
    Display the current user first name
    [currentuser_lastname]
    Display the current user last name
    [currentuser_id]

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?