Title: Course preview template
Last modified: September 1, 2016

---

# Course preview template

 *  Resolved [rahyrs](https://wordpress.org/support/users/rahyrs/)
 * (@rahyrs)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/)
 * 1. I want to customize the look of the course preview but can’t find the template
   to use.
    2. It seems that the output of course shortcode and course page (setting)
   are a bit different (using different template?) I can send you the screenshot.
   3. I also want to display in the course preview and single course page: – the
   author of the course (which I think is = post author?) – the SKU – course categories(
   which I believe is different than post categories?) – course tags – course start
   and end date – course capacity – number of student enrolled – the date of course
   published
 * I know this is a lot of inquiries, but I think these information are useful to
   be displayed along with course title and image, especially for paid courses as
   they give more info at a glance.
    I had put these in the “Trello’s vote for feature”
   for the next update, but would really like to have an interim solution beforehand.
 * Thank you.
 * [https://wordpress.org/plugins/lifterlms/](https://wordpress.org/plugins/lifterlms/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519453)
 * Hey [@rahyrs](https://wordpress.org/support/users/rahyrs/),
 * 1) you’ll want to look at the template at templates/content-course.php.
 * Note that most of the content output here, by default, is output using action
   hooks. Look in the file at includes/llms.template.hooks.php to see what is attached
   to the actions in this template.
 * You can override this template to add whatever metadata you’d like
 * 2) The rendered content might be slightly different based on CSS of your theme,
   but they both, ultimately, utilize the aforementioned template to output their
   content. If you’re seeing drastic issues, let me know what they are specifically.
   Yes, screenshots would help. Links to the pages would help more!
 * 3)
    + Course Author is the course author from the wp_posts table + sku will be
   located in the postmeta table with the key “_sku” + course categories and course
   tags are custom taxonomies: “course_cat” and “course_tag” + start & end date 
   are in the postmeta table with the keys (respectively) “_course_dates_from” and“
   _course_dates_to” + course capacity is in the postmeta table with the key “_lesson_max_user”(
   excuse the misnomer here). + use the code in this gist to get enrolled students:
   [https://gist.github.com/thomasplevy/70a1f02d3e00e18a31d85db4fd6e1a2a](https://gist.github.com/thomasplevy/70a1f02d3e00e18a31d85db4fd6e1a2a)
   + this data is stored in the WordPress post table, use `get_the_date()` ([https://codex.wordpress.org/Function_Reference/get_the_date](https://codex.wordpress.org/Function_Reference/get_the_date))
 * Hope that helps,
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519637)
 * Hi [@thomasplevy](https://wordpress.org/support/users/thomasplevy/),
 *  In the llms.template.hooks.php, there is the same code on 2 lines. Is it intended
   or just a mistake? I delete one of them and see no difference.
 * //After Course Archive Loop Item Title
    add_action( ‘lifterlms_after_shop_loop_item_title’,‘
   lifterlms_template_loop_length’, 10 ); add_action( ‘lifterlms_after_shop_loop_item_title’,‘
   lifterlms_template_loop_length’, 10 );
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519638)
 * [@rahy](https://wordpress.org/support/users/rahy/),
 * Looks like a mistake, I’ll get that duplicate removed in a future release. Thanks
   for the catch!
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519639)
 * Hi [@thomasplevy](https://wordpress.org/support/users/thomasplevy/),
 * I just updated lifterlms to 2.7.7 and now my course list (setting>course page)
   messed up. It looks like the blog page.
    But the shortcode is still good. What
   happened?
 * [https://www.dropbox.com/s/e4zo1a4wucmac1h/course%20page.JPG?dl=0](https://www.dropbox.com/s/e4zo1a4wucmac1h/course%20page.JPG?dl=0)
 * 2. How do I customize the llms.template.hooks ?
    I put it in child-theme > lifterlms
   > include and child-theme > lifterlms, but not read by the plugin.
 * Thank you
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519641)
 * If accessing from menu using Course Category is also ok.
    When looking at the
   template, it pick up content.php which is theme’s blog content. I have remove
   all customization files and still the same. What do you think is wrong? Can you
   tell where I should start looking from?
 * Thank you.
 * [https://www.dropbox.com/s/l9us2zpo5ikhaaq/Screenshot%202016-07-03%2000.33.26.JPG?dl=0](https://www.dropbox.com/s/l9us2zpo5ikhaaq/Screenshot%202016-07-03%2000.33.26.JPG?dl=0)
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519646)
 * 1. When opening the account details using Account Setting link in the my-account
   page and then save, the welcome message name (was 2 words) is change to first
   name (1 word).
    Looking at the my-account.php code, it should be displaying display
   name. Looking at the database table, the display name is changed to first name
   only.
 * So the displaying is correct. But the saving button has truncate the display 
   name.
    After saving, I got logged out from the admin page (openned at the same
   time). And I can’t go back to domain.com/wp-admin/. I always get error message
   that I’m not allowed to open the page.
 * 2. I just realize, does lifterlms uses different template of content-course for
   login user and non-login user? or at least calls something different between 
   the login status?
    Because the custom content-course.php is not called when not
   logged in.
 * You can see the diffrence here:
    The red box is the custom metadata. [https://www.dropbox.com/s/um178w1l3l9iujs/non-login.JPG?dl=0](https://www.dropbox.com/s/um178w1l3l9iujs/non-login.JPG?dl=0)
   [https://www.dropbox.com/s/j7v2ib7a48wh7wl/login.JPG?dl=0](https://www.dropbox.com/s/j7v2ib7a48wh7wl/login.JPG?dl=0)
 * I don’t know if the 2 questions are related or not, but starts from the user 
   details saving, I got difficulties to login to my admin site.
    My site is [http://ukmbelajar.net/](http://ukmbelajar.net/)
 * You can look at them from menu:
    – HOME (using shortcode) –> correct display –
   KATALOG (using page set at lifterlms Setting > Courses) –> layout not grid. –
   KATALOG > KEWIRAUSAHAAN (using course-category) –> llms.template.hooks.php not
   called (I do custom directly in the original file in plugins folder) – KATALOG
   > KEWIRAUSAHAAN > KEPEMIMPINAN (using course-category) –> correct display Thank
   you
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519654)
 * My site has been restored. Everything is good now. I deactivate some plugins.
   
   I don’t yet know what happened. I will explore more later.
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519669)
 * [@rahy](https://wordpress.org/support/users/rahy/),
 * can you please help me prioritize and decipher your string of requests here….
 * I just got back from taking a much needed long weekend away from my computer 
   and I want to resolve your issues as rapidly as possible but it might be that
   you’ve already resolved all of them as per your last post?
 * If each of your above items still need a response please let me know and I’ll
   start responding to them individually.
 * In the future, despite what you might think, it is *tremendously* helpful to 
   me if you post a new thread for new issues, rather than tacking multiple issues
   or questions into one long string of questions. It might seem tedious but it 
   makes my work a lot easier to respond to and help with when you have a string
   of, what looks to me, like 5 or 6 independent issues and questions.
 * Thanks,
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519672)
 * Hi [@thomasplevy](https://wordpress.org/support/users/thomasplevy/),
 * Yes the problem has been resolved.
    For the next time, I will have separate posts
   for each issue. Thank you.
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/course-preview-template/#post-7519673)
 * [@rahy](https://wordpress.org/support/users/rahy/),
 * Great thanks and let us know if you need anything further!
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/course-preview-template/#post-7519697)
 * duplicate action hook resolved in 2.7.11
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/course-preview-template/#post-7519698)
 * thanks for letting me know.
    I want to customize the page displaying the hooks(
   the course preview/link). But putting the customized llms.template.hooks.php 
   in a folder named includes in the theme child doesn’t work. How do I do that?
   Thanks
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/course-preview-template/#post-7519701)
 * [@rahy](https://wordpress.org/support/users/rahy/),
 * If you want to change, add, or remove actions you’ll need to do the following(
   do this in a functions.php file — LifterLMS only looks for overrides of TEMPLATES
   not actual function files or classes):
 * 1) Remove the action you’ve found in llms.template.hooks.php using [remove_action()](https://codex.wordpress.org/Function_Reference/remove_action)
 * 2) Add the action back in using [add_action()](https://developer.wordpress.org/reference/functions/add_action/)
   with your updated priority / order
 * Hope that helps,
 *  [rahy](https://wordpress.org/support/users/rahy/)
 * (@rahy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/course-preview-template/#post-7519713)
 * Hi [@thomasplevy](https://wordpress.org/support/users/thomasplevy/),
 * Thank you for your advice.
    Its done and case closed. Thank you
 *  [mhamamra](https://wordpress.org/support/users/mhamamra/)
 * (@mhamamra)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/course-preview-template/#post-8300706)
 * hello ,, i just want to thank u ^^ i have the same request and i got it ..
    but
   i have a bit issue am not expert so i dont know how to use the code to add the
   studants count on the page and the capacity ..

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Course preview template’ is closed to new replies.

 * ![](https://ps.w.org/lifterlms/assets/icon.svg?rev=2034507)
 * [LifterLMS - WP LMS for eLearning, Online Courses, & Quizzes](https://wordpress.org/plugins/lifterlms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lifterlms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lifterlms/)
 * [Active Topics](https://wordpress.org/support/plugin/lifterlms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lifterlms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lifterlms/reviews/)

## Tags

 * [template](https://wordpress.org/support/topic-tag/template/)

 * 15 replies
 * 4 participants
 * Last reply from: [mhamamra](https://wordpress.org/support/users/mhamamra/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/course-preview-template/#post-8300706)
 * Status: resolved