|
↳ See all 15 articles
/ Documentation /Theme Customization/ LearnDash Shortcode to Add Profile Link

LearnDash Shortcode to Add Profile Link

This is a premium feature available with the Astra Pro Addon plugin. To use these Pro features, you need to have the Astra theme along with the Astra Pro Addon installed on your website.

You can achieve displaying a Profile Link using a LearnDash shortcode using the LearnDash module available with Astra Pro. Refer to this document to begin with the LearnDash module.

Astra Pro Addon provides a shortcode for LearnDash that allows displaying a profile link. The shortcode can be used anywhere on the website. It displays a profile picture for logged-in students, and clicking on it displays the student’s profile details.

The LearnDash module in Astra Pro Addon provides the shortcode [astra_learndash_profile_link]. This can be used in various locations like the header, footer, sidebar, widgets, and page builders.

To use the shortcode, make sure the LearnDash module is enabled first. Go to WordPress Dashboard → Astra → Dashboard, and under the Modules section, enable LearnDash.

[astra_learndash_profile_link] has an attribute called link that opens on click of the profile picture.

For example, [astra_learndash_profile_link link="https://www.google.com"]. This shortcode displays a profile picture for the logged-in student. On click, it redirects to the inserted link, i.e., to https://www.google.com.

Below is an example of how this shortcode can be used in the header.

How to Display Learndash Profile Link in the Primary Header?

Below are the detailed steps –

  1. Make sure the LearnDash plugin and Astra Pro Addon are active, and the LearnDash module is enabled (WordPress Dashboard → Astra → Dashboard), as covered above.
  2. Go to WordPress Dashboard → Appearance → Customize → Header.
  3. In the Header Builder, pick the row where you want the profile link to appear — Above Header, Primary Header, or Below Header — then click the + icon on the section of that row where you want to add it (e.g., Main – Right).
  4. From the Insert Elements popup, click HTML. This adds an HTML element to that row. After completing this step, the HTML element appears in the row, and its settings panel opens automatically so you can add content to it.
  5. Paste the shortcode into the content area of the HTML element, for example: [astra_learndash_profile_link]
  6. Click Publish to save changes.

Expected Outcome

The LearnDash profile picture appears in the header row and position you chose. For logged-in students, clicking the picture opens their profile details (or the URL set in the link attribute, if used).

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Scroll to Top