You can add related videos at the program level.  This is accomplished through the creation of a category called "related videos".

  1. Create the category for your related videos.  Note the slug name under "Advanced tab".
  2. Go to settings and create a Program Field - boolean setting.  This will allow you to turn on or off related videos on the advanced tab of programs.
  3. Add the following code to program.liquid.  Make sure to change the following:
    .custom_field_626
    category.slug == 'related-videos'

{% if program.custom_fields.custom_field_626 %}
  {% for category in catalog.categories %}
    {% if category.slug == 'related-videos'%}
      <section class="one-category">
        <div class="section-wrapper">
          <h2 class="one-category__header">{{category.title}}</h2>
          <div class="category-row">
            {% for program in category.programs limit: 25 %}
              {% include "program_card" %}
            {% endfor %}
          </div>
        </div>
      </section>
    {% endif %}
  {% endfor %}
{% endif %}

Did this answer your question?