Plugin Author
WPKube
(@wpkube)
Hi @reggie_bond
The plugin doesn’t alter anything in the admin.
When registering custom post types with register_post_type
one of the parameters in there is to set what the new post type support. One of those things is “excerpt” and I’m assuming that it wasn’t added to the list of supported functionality.
You could add support to specific functionality using the function add_post_type_support
Here’s an example of adding “excerpt” support for a custom post type:
function my_prefix_init() {
add_post_type_support( 'sfwd-lessons', 'excerpt' );
} add_action('init', 'my_prefix_init');
Thread Starter
Dan
(@reggie_bond)
Hi there,
Thank you very much for taking the time to help me out! Much appreciated!
Plugin: I understand. I must have misinterpreted the function. But, I still will use it for the provided parameters.
PHP Snippet: Great! I have implemented 2 snippets into my functions.pp. Both work as intended, excerpt fields in CPT backends are now available. For reference in case somebody is researching the topic:
for LearnDash 3 ‘Lessons’:
function excerpt_cpt_sfwd_lessons_init() {
add_post_type_support( ‘sfwd-lessons’, ‘excerpt’ );
} add_action(‘init’, ‘excerpt_cpt_sfwd_lessons_init’);action(‘init’, ‘my_prefix_init’);
for LearnDash 3 ‘Courses’:
function excerpt_cpt_sfwd_course_init() {
add_post_type_support( ‘sfwd-courses’, ‘excerpt’ );
} add_action(‘init’, ‘excerpt_cpt_sfwd_course_init’);
Again, thank you!
-
This reply was modified 5 months, 4 weeks ago by
Dan. Reason: formatting
Plugin Author
WPKube
(@wpkube)
You’re welcome @reggie_bond