Astra Pro plugin provides a shortcode for LearnDash that allows displaying profile link. The shortcode can be used anywhere on the website. It will display a profile picture for logged in students. Clicking on it will display student profile details.
The LearnDash addon in the Astra Pro provides a shortcode
[astra_learndash_profile_link] This can be used on various locations like header, footer, sidebar, widgets, page builders etc.
To use the shortcode, activate the LearnDash addon from Astra Options. (screenshot)
[astra_learndash_profile_link] has an attribute ‘link’ that will open on click of profile picture.
For Example –
[astra_learndash_profile_link link="https://www.google.com"] This shortcode will display a profile picture for logged in the student. On click, it will be redirected to inserted link i.e. to https://www.google.com
Below is the example that shows how can this shortcode be used –
How to display LearnDash profile link in the primary header?
Below are the detailed steps –
Step 1 – Make sure to activate LearnDash and Astra Pro plugin. Activate LearnDash addon from Astra Options. (screenshot)
Step 2 – From the WordPress dashboard navigate to Appearance > Customize > Layout > Header > Primary Header.
Step 3 – From the Last Item in Menu drop-down, select Text / HTML.
Step 4 – Paste the code in the input area. Profile link will appear in the header as shown below –
- Tagged Under:
- LearnDash profile link in the primary header