• Skip to primary navigation
  • Skip to main content
Daniel McClure

Daniel McClure

Entrepreneurship, Marketing, Technology, Travel & Lifestyle

  • About
  • Credentials
  • The Blog of Daniel McClure
  • Social
  • Code
  • Contact
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Enable excerpts for LearnDash Lessons

Code snippet posted to GitHub Gist by Daniel McClure.

You are here: Home » Code Snippets » #PHP » Enable excerpts for LearnDash Lessons

Last Updated: October 30, 2018 Leave a Comment

The following is a code snippet originally posted by Daniel McClure on GitHub as a Gist.

“`
* Enable excerpts for LearnDash Lessons
*/
function add_excerpts_to_ld_lessons() {
add_post_type_support( ‘sfwd-lessons’, ‘excerpt’ );
}
add_action( ‘init’, ‘badd_excerpts_to_ld_lessons’ );
“`

Original Gist


<?php
/**
* Enable excerpts for LearnDash Lessons
*/
function add_excerpts_to_ld_lessons() {
add_post_type_support( 'sfwd-lessons', 'excerpt' );
}
add_action( 'init', 'add_excerpts_to_ld_lessons' );

view raw

functions.php

hosted with ❤ by GitHub

Filed Under: GitHub Gist Tagged With: #PHP

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

You can encrypt your comment so that only Daniel McClure can read it.

Daniel McClure

Work With Me

Get in touch if you’re interested in working together on your next project.

Contact Me

Creative Commons Licence

Copyright © 2025 Daniel McClure

All opinions shared through this site are that of their respective author and are not necessarily representative of the views of past/present clients, affiliate partners or businesses.
Some links include affiliate tracking for which I may earn a commission. See the Full Disclaimer Page for more information.