Group Mods

  • Profile picture of r-a-y
  • Profile picture of Hugo
  • Profile picture of @mercime

Support: Miscellaneous

Everything else.

referencing the current user in a page i created in wordpress (3 posts)

Started 10 months, 2 weeks ago by: Hector100

  • Profile picture of Hector100 Hector100 said 10 months, 2 weeks ago:

    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.

  • Profile picture of Hugo Hugo said 10 months, 2 weeks ago:

    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:

    http://codex.wordpress.org/Function_Reference/wp_get_current_user

  • Profile picture of Hector100 Hector100 said 10 months, 2 weeks ago:

    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