<section class="archive-filter">
  <form action="" method="get" id="event-categories">

    <select class="category-picker" name="category" data-landing-page="<?php 
echo $landing_page;
?>
">
      <option value="">&ndash; Event Categories &ndash;</option>

      <?php 
foreach ($categories as $category) {
    ?>
        <?php 
    $term_link = get_term_link($category, $category->taxonomy);
    $term_link = fwe_relative_url($term_link);
    ?>
        <option value="<?php 
    echo $term_link;
    ?>
">
          <?php 
    echo $category->name;
    ?>
        </option>
      <?php 
}
?>
    </select>

  </form>
<?php

global $fwe_settings;
$page_id = $stitch['stitch_page']->ID;
$path = fwe_relative_url(get_permalink($page_id));
$backgrounds = get_post_meta($page_id, 'page_backgrounds', true);
$backgrounds = fwe_build_page_background_object($backgrounds);
$bg_data = '';
$section_style = '';
$content_style = '';
$slider_speed = fwe_theme_option_exists('global_slider_speed') ? $fwe_settings['global_slider_speed'] : 8;
if (!empty($backgrounds)) {
    $bg_data = !empty($backgrounds) ? ' data-backgrounds="' . htmlspecialchars(json_encode($backgrounds)) . '"' : '';
    $first_bg = $backgrounds[0];
    $section_style = fwe_style_attribute(array('background-image' => "url({$first_bg['backgroundImage']})", 'background-size' => $first_bg['backgroundSize'], 'background-position' => $first_bg['backgroundPosition'], 'background-repeat' => $first_bg['backgroundRepeat']), true);
    $content_style = fwe_style_attribute(array('color' => $first_bg['textColor'], 'background-color' => fwe_hex_to_rgba($first_bg['backgroundColor'], $first_bg['colorOpacity'])), true);
}
?>
<section
  <?php 
echo $bg_data;
echo $section_style;
?>
  class="stitch content-section"
  id="<?php 
echo $stitch['stitch_page']->post_name;
?>
"
  data-slug="<?php 
echo $stitch['stitch_page']->post_name;
?>