Hiding the "related articles" box when there are no other articles in the section


1 Comentarios

  • Pulkit Pandey
    Community Moderator
    Zendesk Luminary

    Hi Josh Hersh

    Please add the below code at the bottom of your script.js file 

      var articleSidebar = document.querySelector(".sidebar-section-articles ul").childElementCount;
      if(articleSidebar <= 1) {

    And also place the below CSS code at the bottom of your style.css file

    .hidden {
    display: none;

    Let me know if it solves your issue



    Team Diziana


Iniciar sesión para dejar un comentario.

Tecnología de Zendesk