LearnDash errors with Bootstrap CSS


/ Published in: HTML
Save to your folder(s)

I'm using the learndash shortcode:
[ld_course_list categoryselector=true col=3]

The HTML it outputs is missing a div with class=row. When you're using Bootstrap, you need a "row" div if you want to put col divs inside of other col divs. You also have everything inside of a <strong> tag, which is clearly an error.

What you should do is a) rid of the <strong> tag, and b) you should add a after the ld_categorydropdown div that closes where the </strong> currently is.

You might ask why I care. I care because I'm trying to style this thing, and the boxes/columns don't line up properly if they aren't in a "row".


Copy this code and paste it in your HTML
  1. <!-- Stripped down, this is what your code is outputting: -->
  2.  
  3. <div class="fw-row">
  4. <div class="fw-col-xs-12">
  5.  
  6. <div id="ld_categorydropdown">[FORM ETC]</div>
  7.  
  8. <div class="ld_course_grid col-sm-6 col-md-4">
  9. <article id="post-70" class="thumbnail course post-70 ...">
  10. </article><!-- #post-## -->
  11. </div>
  12. <div class="ld_course_grid col-sm-6 col-md-4">
  13. <article id="post-13" class="thumbnail course post-13 ...">
  14. </article><!-- #post-## -->
  15. </div>
  16.  
  17. </strong>
  18. </div>
  19. </div>
  20.  
  21. <!-- This is what it should look like instead: -->
  22.  
  23. <div class="fw-row">
  24. <div class="fw-col-xs-12">
  25.  
  26. <div id="ld_categorydropdown">[FORM ETC]</div>
  27.  
  28. <div class="row">
  29. <div class="ld_course_grid col-sm-6 col-md-4">
  30. <article id="post-70" class="thumbnail course post-70 ...">
  31. </article><!-- #post-## -->
  32. </div>
  33. <div class="ld_course_grid col-sm-6 col-md-4">
  34. <article id="post-13" class="thumbnail course post-13 ...">
  35. </article><!-- #post-## -->
  36. </div>
  37. </div><!-- end new 'row' -->
  38.  
  39. </div>
  40. </div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.