We had a client project where a lot of cross-plugin integrations were involved. There were like 30 plugins installed, but most of them used to setup a nice community membership website. This setup included core plugins like LearnDash LMS, WooCommerce, Elementor, BuddyBoss, GamiPress, ActiveMember360 and bunch of add-ons to tie all that together. To be exact, LearnDash integration for WooCommerce, GamiPress integration for BuddyBoss, ActiveMember360 integration for LearnDash and etc.
Client had an issue, where one of these plugins was breaking LearnDash Course Grid layout. This page was also modified with Elementor. You know that one page by default available at /dashboard/ url.
I had to figure this out and come up with a fix.
Before the fix (broken layout)
By the way, this is how the broken LearnDash courses / trainings page layout looked like:
Debugging and detecting the roots
It took a while (almost 2 days, what?!) to debug this issue and track down where it was coming from. First I thought it was caused by caching. Then I supposed it was due to some Elementor conflict. And finally I realized that was coming from some permission issues configured in ActiveMember360. Because the issue was visible only for newly created subscriber-level users, while for admins it was all fine.
Detecting this thing coming from AM360 LearnDash integration was only the first half of that fix 🙂
Figuring out the solution was another half, which took a decent effort as well.
Due to some permissions being overwritten by different plugins multiple times the layout was breaking only for subscriber/member users. It was breaking because AM360 had a hook, where it either replaced full page contents with an excerpt or just filtered away most of HTML code.
Here’s the fix I came up with (put it into functions.php):
remove_filter( 'mbr_excerpt', array( $GLOBALS['mbrlearndash'], 'learndash_mbr_excerpt' ), 0 );
function mbr_visibility_fix( $return, $_post )
if( in_array( $_post->post_type, [ 'sfwd-courses' ] ) )
add_filter( 'mbr/visibility/check/exception', 'mbr_visibility_fix', 9999, 2 );
And after adding this snippet of code to the functions.php, page layout was immediately fixed with all the titles, sorting and styles in place.
After LearnDash courses layout was fixed
Here’s how it started looking after the fix:
If this post was helpful, please leave us some feedback below.
If you are running a membership/community website powered by LearnDash and WooCommerce (or Easy Digital Downloads), you might need Gift a Course feature for LearnDash. Letting your customers gift your courses to their friends and families is a great opportunity to make more sales these days.
And that’s what we specialize in – providing you with tools to make more sales 🙂