PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

wp get current user

  1. tonymlaw
    Member

    Hi, im trying to figure out a way of adding some code to a html block to show the user if they are logged in. I have tired various codes such as <?php wp_get_current_user(); ?> but not having much success ! Is it possible ?

    Posted 13 years ago on Friday March 11, 2011 | Permalink
  2. The HTML block field in Gravity Forms doesn't support PHP being entered in it.

    HOWEVER in the upcoming 1.5 release (which is available as a development release on the Downloads page) the HTML block field does support shortcodes. So you could write a shortcode that executes the PHP you want and then use that shortcode in the HTML field.

    Here is some information on shortcode creation:

    http://codex.wordpress.org/Shortcode_API

    Posted 13 years ago on Friday March 11, 2011 | Permalink
  3. tonymlaw
    Member

    Great stuff , cheers

    Posted 13 years ago on Friday March 11, 2011 | Permalink