Skip to:
Content
Pages
Categories
Search
Top
Bottom

referencing the current user in a page i created in wordpress

  • @hector100

    Member

    I created a page in wordpress and i tried to access the current logged in user via wp_get_current_user() and am getting error “function undefined”. please how do I make this function available in my page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @hnla

    Participant

    You are asking about WP functions on a support forum for BP :)

    What are you actually trying to do? There may be BP method.

    The function is failing as you likely haven’t called the global variable $current_user or get_currentuserinfo#()
    but you should read the WP codex on how to access this data.

    All the info you need is in the codex pages:
    https://codex.wordpress.org/Function_Reference/wp_get_current_user

    @hector100

    Member

    Am using buddypress and the page is a php page. i need to reference the current user in these page but it is not working out

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘referencing the current user in a page i created in wordpress’ is closed to new replies.
Skip to toolbar