Graphina Documentation

Unlocking the Power of Dynamic Keys in WordPress


Dynamic Keys are a powerful feature that allows users to configure and modify variables dynamically within MySQL queries and APIs. With this capability, users can create interactive tables and charts that adapt based on shortcodes, displaying different data on various pages.

To use this feature, simply enable the Dynamic Key option from the Elementor editor. Once activated, you can personalize content effortlessly, ensuring your charts and tables reflect real-time, user-specific data.

Important Note:

Ensure the Dynamic Key option is enabled in the Elementor editor before using these keys.

List of Available Dynamic Keys

  • {{CURRENT_USER_ID}} – Retrieves the ID of the currently logged-in user (returns 0 if the user is logged out).
  • {{CURRENT_USER_EMAIL}} – Displays the logged-in user’s email. If the user is not logged in, the default email will be demographina@gmail.com.
  • {{CURRENT_USER_ROLE}} – Reflects the role of the currently logged-in user. If no user is logged in, the default role will be demoadmin.
  • {{CURRENT_DATE}} – Replaces the key with the current WordPress date (Format: Y-m-d).
  • {{CURRENT_DATE_TIME}} – Displays the current WordPress date and time (Format: Y-m-d H:i:s).
  • {{CURRENT_TIME}} – Shows the current WordPress time (Format: H:i:s).
  • {{QUERY_PARAM_’query parameter key’}} – Fetches the value of a query string parameter from the page URL. If the parameter is missing, the key remains unchanged.

Example Usage:

If your page URL contains a query string like:
http://localhost/graphina/?user_id=1
Using {{QUERY_PARAM_user_id}} will retrieve the value 1.

Limitations to Keep in Mind:

  • Dynamic Keys do not function in Elementor editor mode or preview mode.
  • They will not work if the page is accessed through an iframe.

By leveraging Dynamic Keys, you can enhance user experiences by displaying personalized, real-time content with minimal effort.