Hide LearnDash Course Grid Settings on Post Types

Updated 12 months ago
by Dave Warfel

You can use the following PHP snippet to hide the Course Grid settings meta box on specific post types. This will remove all of the Course Grid options from the edit pages on the post types that you don’t want it on.

By default, the Course Grid settings are displayed on all post types, but most people just need them on courses, and maybe lessons or topics. But that’s it.

add_filter('learndash_course_grid_excluded_post_types', function() {
return [
'sfwd-transactions',
'sfwd-essays',
'sfwd-assignment',
'sfwd-certificates',
'attachment',
'posts',
'page'
];
}, 99);

The code above will remove the grid settings meta box from LearnDash transactions, essays, assignments, and certificates, as well as WordPress attachments, posts, and pages.

You can add custom post types to the list, separated by commas, to exclude the grid settings from additional post types.

All CSS code should either be placed in a child theme’s main CSS file (typically style.css), or the Additional CSS area of the WordPress Customizer.

How to Add CSS to Your Site

Forum Rules

Be Kind & Patient

We’re here to learn and/or help each other. Please don’t be mean, rude, or condescending. Treat all members the way you should be treating dogs and your elders—with the utmost love & respect.

External Links

✅ Other websites that add value, help solve problems & contribute to the discussion. ❌ Affiliate links are prohibited. (Site owners may use affiliate links to help support the site.)

Promotion

✅ You may promote your own products/services if they are relevant to an existing discussion. You must disclose your relationship with the product(s).
❌ You may not create new posts simply to promote your products.

Non-LearnDash Topics

❌ General (free) Forum: Only LearnDash-specific topics are allowed.
✅ Premium Forums: You are allowed to post other questions tangentially related to LearnDash. Please use the appropriately named forum. If it doesn’t exist, use the “LearnDash Integrations” forum.

Our Right to Remove

We reserve the right to remove any content, at any time, for any reason. We can also merge one post with another. We will exercise caution when removing content and always try to provide an explanation.