LearnPress

Shortcodes

1. Become a teacher

Shortcode:

[ learn_press_become_teacher_form]

Attribute :

  • title (text)
  • description (text)
  • submit_button_text (text)
  • submit_button_process_text (text)

This shortcode will show become a teacher form:

2. Purchase-Enroll course button

Shortcode :

[learn_press_button_course]

Attributes:

  • id : If you want to buy a specific course, you can add id of that course. if not, you don’t need to add id.

This shortcode will show start now button:

3. Checkout page

Shortcode:

[learn_press_checkout]

This code will show checkout form:

4. Course Curriculum

Shortcode:

[learn_press_course_curriculum ]

Attribute:

  • id : If you want to show a specific course, you can add id of that course. if not, you don’t need to add id.

This shortcode will show the curriculum of the course:

5. Login form

Shortcode : 

[learn_press_login_form]

This shortcode will show login form:

6. Register form

Shortcode: 

[learn_press_register_form]

This shortcode will show register form:

7. Profile page

Shortcode : 

[learn_press_profile]

This shortcode will show profile page:

Shortcode :

[learn_press_featured_courses]

Attributes:

  • limit : the number of courses will show.
  • order_by : title , id …..
  • order : DESC or ASC

This shortcode will show list featured course:

9. List Recent Course

Shortcode : 

[learn_press_recent_courses]

Attributes:

  • limit : the number of courses will show.
  • order : DESC or ASC

This shortcode will show recent courses:

Shortcode : 

[learn_press_popular_courses]

Attribute :

  • limit: the number of courses will show.

This shortcode will show list popular courses.

11. Filter Course

Shortcode : 

[learn_press_filter_course]

You can add this shortcode wherever you want. After adding the shortcode, it will show:

12. Student List

Shortcode : 

[learn_press_students_list course_id=1234]

Attributes:

  • id : If you want to display list of students of a specific course, you can add the ID of that course. Otherwise, you don’t need to add the ID.

This shortcode will display as follows:

12. Press Courses

Shortcode :  [learn_press_courses]

The [learn_press_courses] shortcode is used to display a list of courses in LearnPress with flexible filtering and ordering options. By using this shortcode, you can filter courses by author, course type, category, or tag, as well as control the display order and the maximum number of courses shown on a page.

The c_author attribute allows you to specify the ID of a single course author. If you want to display courses from multiple authors, you can use the c_authors attribute and provide a comma-separated list of author IDs, such as 1,2,3.

The c_type attribute is used to filter courses by type, including online or offline. In addition, courses can be filtered by category using the term_id attribute, or by tag using the tag_id attribute, where the values ​​correspond to the course category ID or course tag ID in the system.

To control the ordering of the course list, the shortcode supports the order_by attribute with various available values. Courses can be ordered by publish date (date), course ID (ID), admin-defined order (menu_order), price from high to low (price) or from low to high (price_low), popularity (popular), course title from A to Z (post_title), or from Z to A (post_title_desc).

Finally, the limit attribute allows you to define the maximum number of courses that will be displayed when the shortcode is rendered on the page.