• Resolved omahoung

    (@omahoung)


    Hello,

    Is there a way to set a maximum number of courses using the shortcode [lifterlms_courses]. I can see in the doc a “posts_per_page” but this is not really what I need. I need to display only 3 courses on a home page section, how to do that using the shortcode?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @omahoung

    Aside from the post per page we don’t have a way to restrict it to only three, exactly.

    You could always use the id option in the shortcode and list the three courses you want displayed on the home page. This would not have the same pagination that happens with post per page, but this would not dynamically update by new course added. You would need to change out the id of the courses you wanted displayed if a new one should be there.

    Would this work as an alternative for you?

    Let us know if you have any further questions!

    All the best,

    Thread Starter omahoung

    (@omahoung)

    Hi,

    For now I use the posts_per_page option and I hide the pagination by CSS. It is not ideal but it works. I thought about the courses id but like you said it would not be dynamically updated.

    Maybe you can consider adding a max courses number to the shortcode. Woocommerce and other plugins have this kind of option in their shortcodes.

    Have a nice day.

    Hi @omahoung

    We’re glad to hear you’ve found a work around!

    Thank you for the suggestion! We’ll add this to our feature request board for the product team to have a look at that feature in WooCommerce.

    Please let us know if you have any further questions!

    All the best,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘lifterlms_courses shortcode’ is closed to new replies.