This members-only tutorial provides the steps to define a custom function that returns data of the current logged in user like first name, last name, display name depending on the input parameter in Oxygen.

Once the function has been added, to show user's first name for example you could simply add a Text component in Oxygen, double click to select the text, click on Insert Data button in the top toolbar, click on PHP Function Return Value and

Function Name: wpdd_current_user

Here are the possible arguments:

user_login: Username

user_email: User email

user_firstname: User first name

user_lastname: User last name

display_name: User display name

ID: User ID

How to add the Function

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: [Function] Current User Info

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($27/month).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: