LifterLMS Conditional Tags

Introduction

# Top

These conditional tags can be used in the same way that the core WordPress conditional tags can be used, except these conditional tags apply specifically to LifterLMS template and content types.

Each conditional function returns either true if the condition is met or false if the condition is not met.

For example, if is_course() if used on a template for a LifterLMS Course, it will return true, but if it is used anywhere else (like on a WordPress page) it will return false.

Course

# Top

is_course()

Determine if a LifterLMS course is being displayed.

Course Catalog

# Top

is_courses()

Determine if the LifterLMS Course Catalog is being displayed

Lesson

# Top

is_lesson()

Determine if a LifterLMS Lesson is being displayed.

Quiz

# Top

is_quiz()

Determine if a LifterLMS quiz is being displayed.

Membership

# Top

is_membership()

Determine if a LifterLMS membership is being displayed.

Membership Catalog

# Top

is_memberships()

Determine if the LifterLMS Membership Catalog is being displayed.

Student Dashboard

# Top

is_llms_account_page()

Determine if the LifterLMS Student Dashboard is being displayed

Checkout

# Top

is_llms_checkout()

Determine if the LifterLMS Checkout page is being displayed

Last Updated on
Was this article helpful?