How to Build a Student Profile Page With the ld_profile Shortcode
What the LearnDash ld_profile shortcode shows, every attribute with its default, who can view whose profile, how pagination and search work, and a recipe for a learner dashboard page built around it.

The profile shortcode is LearnDash's built-in learner dashboard: avatar and name, course points, an expandable list of enrolled courses with progress bars, certificates and quiz attempts. One shortcode on a page gives learners a place to see everything they are doing. In LearnDash 4.18.0.1 it has a dozen attributes, several of which change the page substantially, and some rules about whose data it will show. This guide covers the output, the attributes with their defaults from the shortcode source, and a layout for a complete dashboard page.
What it renders
A header with the user's avatar, display name, a link to edit the WordPress profile when allowed, and the course points total. Below that, a summary line with counts of registered, completed and certificate-earning courses, an optional search box, and one row per enrolled course showing the title, status, a progress bar and an expand control. Expanding a row reveals the certificate link when earned and the quiz attempts for that course with scores, dates and statistics links. Pagination appears beneath the list when there are more courses than fit on a page.
The attributes
user_id: whose profile. Defaults to the current user, with the protection described below.per_page: courses per page. Defaults to the Per Page value in LearnDash General settings, which is 20 unless changed. Set to a number to override.orderbyandorder: course ordering, defaulting to ID descending. Title ascending reads better for most learners.show_header: yes by default. Set to no to drop the avatar and name block when your page already has one.show_search: yes by default. The search filters the learner's course list by title and is only useful for learners with many courses.show_quizzes: yes by default. Set to no to hide quiz attempts inside each course row.expand_all: false by default. When true every course row starts expanded, which suits a page meant for printing or review.profile_link: yes by default, adding the edit-profile link in the header for users who can edit their own profile.course_points_user: yes by default, showing the points total in the header.quiz_num: how many quiz attempts to list per course. Defaults to the same Per Page value.search: a preset search string, mainly for building filtered views by code.
The yes and no values also accept true and false. A minimal dashboard is simply:
[ld_profile orderby="title" order="ASC" show_search="no"]
Whose profile can be shown
The shortcode checks the requested user against the viewer. If they differ, an administrator may view anyone; a group leader may view a user in one of their groups, otherwise the shortcode falls back to the leader's own profile; and any other user always sees their own profile no matter what user ID is passed. So a page with [ld_profile user_id="57"] is safe to publish: learners see themselves, staff see user 57. That makes it possible to build a simple "view learner" page for group leaders by passing the ID through a query string with a few lines of code, although the group administration screens already provide that view.
Logged-out visitors get nothing. Wrap the shortcode in a login prompt or place it on a page restricted to logged-in users.
Pagination and performance
Courses are fetched for the user and then sliced for the current page, so the page number is handled by the shortcode's own pager rather than WordPress pagination, and it works on any page type. The list is built from the learner's enrollments including group access, so a learner in a large group sees every group course. Quiz attempts are read from the user's quiz history, and a learner with hundreds of attempts will have a slow profile unless quiz_num is kept small or show_quizzes is turned off; the attempts remain available in the course rows' statistics links.
A complete dashboard layout
A dashboard page that learners actually use usually has three parts, all available as shortcodes or blocks:
- Continue. A Resume button at the top that opens the next incomplete step of the last active course, from
[ld_course_resume]; see how course resume works. - Progress. The profile shortcode with the header on, search off and courses ordered by title.
- Discover. A list of courses the learner is not enrolled in, from
[ld_course_list mycourses="not-enrolled"]or a Course Grid, so the page also sells.
<h2>Welcome back</h2>
[ld_course_resume label="Continue learning"]
<h2>Your courses</h2>
[ld_profile orderby="title" order="ASC" show_search="no" per_page="10"]
<h2>Explore more</h2>
[ld_course_list mycourses="not-enrolled" num="6" col="3"]
Set the page as the login redirect so learners land on it, and add it to the account menu.
Customising the output
The profile is rendered from templates in the LearnDash 3.0 theme's shortcodes folder, with one file per part: the header, the course row, the progress block, the quiz row and the search form. Copy any of them to the same path under learndash/ld30/shortcodes/profile/ in your theme to override. For changes to the data rather than the markup, the attributes pass through the general shortcode attributes filter, described in the shortcode filters guide, and the course list itself comes from the same function the My Courses views use.
Alternatives
If the page needs the learner's groups, add [user_groups] beneath the profile. If it needs purchase history, LearnDash has no shortcode for transactions; that comes from WooCommerce's account page on stores that sell through it, and showing LearnDash progress on the WooCommerce My Account page covers merging the two. The full list of shortcodes is in the shortcodes cheat sheet.
When to get help
A dashboard from the pieces above takes an afternoon. A dashboard with custom cards, due dates, manager views or data from outside LearnDash is a design and development project that our LearnDash services team delivers with UI and UX design; a LearnDash developer can also tune a slow profile page for learners with large histories.
Frequently asked questions
Can learners see other learners' profiles with ld_profile?
No. A non-admin, non-leader viewer always sees their own profile whatever user_id is passed. Administrators see anyone and group leaders see their own group members.
How do I change how many courses show per page?
Set per_page on the shortcode. Without it, the Per Page value from LearnDash General settings applies.
Why is the profile page slow?
Usually quiz attempts. Lower quiz_num or set show_quizzes to no for learners with large histories.
Can I hide the avatar and name?
Yes, set show_header to no. Course points can be hidden separately with course_points_user set to no.
Add worldwincoder.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.
