Code works on localhost but not on server
<p>I have just launched my clients site to a temporary URL so they can do data input while i finish up on CSS and finishing touches. When I launched the site however, I found that part of it broke, the culprit being a custom-post slider. I don't understand why it's breaking as it works perfectly fine on my localhost.</p>

<p>I am using a pkg called Flickity, and it has been treating me very well up until now. I am using other Flickity sliders on my site, so I know that FLickity itself is not the problem. I have attached below my code for the slider.</p>

<p>The Custom Posts are Theatre Productions, and are meant to be ordered according to the closing performance date: ending_date [ACF].</p>

<pre><code>&lt;section class="slider-prod"&gt;
</code></pre>

<p>
    Our Productions</p>

<pre><code>&lt;div class="gallery js-flickity prod-slider" data-flickity-options='{"imagesLoaded": true, "selectedAttraction": 0.01, "friction": 0.3, "groupCells": 3, "cellAlign": "left", "contain": true, "pageDots": false }'&gt;


&lt;!-- CURRENT PRODUCTION --&gt;       
    &lt;?php // query posts
      $params = array(
        'post_type' =&gt; 'productions',
        'post' =&gt; $id,
        'posts_per_page' =&gt; -1,
        'meta_key' =&gt; 'ending_date',
        'orderby' =&gt; 'meta_value',
        'order' =&gt; 'ASC',
      );

      $slider_posts = new WP_Query($params);
    ?&gt;

    &lt;?php if ( $slider_posts-&gt;have_posts() ) while ( $slider_posts-&gt;have_posts() ) : $slider_posts-&gt;the_post(); ?&gt;          

      &lt;?php date_default_timezone_set('America/New_York'); 
        $slider_link = get_permalink();
        $starting_date = get_field('starting_date'); 
        $ending_date = get_field('ending_date'); 
        $location = get_field('location'); 
        $prod_link = get_permalink(); 
        $todays_date = date(Ymd); 
        ?&gt;


      &lt;?php if (($todays_date&lt;=$ending_date) and ($todays_date&gt;=$starting_date)): ?&gt;   
        &lt;div class="gallery-cell future-prod"&gt;
          &lt;a href="&lt;?php echo $slider_link; ?&gt;" class="slider-link"&gt;            
            &lt;?php the_post_thumbnail('hero'); ?&gt;
            &lt;div class="content"&gt;                
              &lt;h3&gt;            
                &lt;?php the_title(); ?&gt;
              &lt;/h3&gt;
              &lt;p&gt;
              &lt;?php 
                $end = date_create_from_format('Ymd',$ending_date);
                $start = date_create_from_format('Ymd',$starting_date);
                echo "&lt;span class='month'&gt;" . $start-&gt;format('F') . "&lt;/span&gt;";
                echo " ";
                echo "&lt;span class='day'&gt;" . $start-&gt;format('j') . "&lt;/span&gt;";
                echo ", ";
                echo "&lt;span class='year'&gt;" . $start-&gt;format('Y') . "&lt;/span&gt;";

                echo " - ";

                echo "&lt;span class='month'&gt;" . $end-&gt;format('F') . "&lt;/span&gt;";
                echo " ";
                echo "&lt;span class='day'&gt;" . $end-&gt;format('d') . "&lt;/span&gt;";
                echo ", ";
                echo "&lt;span class='year'&gt;" . $end-&gt;format('Y') . "&lt;/span&gt;";
                echo ", $location";
               ?&gt; 
              &lt;/p&gt;
              &lt;p&gt;              
                &lt;?php echo wp_trim_words( get_the_content(), 40, '...' ); ?&gt;
              &lt;/p&gt;
              &lt;h4 class="status now-playing"&gt;
                Now Playing
              &lt;/h4&gt;
            &lt;/div&gt;
          &lt;/a&gt;
        &lt;/div&gt; &lt;!-- /.gallery-cell.future-pro --&gt;
      &lt;?php endif ?&gt;

    &lt;?php endwhile; ?&gt;


&lt;!-- FUTURE PRODUCTION --&gt;       
    &lt;?php // query posts
      $params = array(
        'post_type' =&gt; 'productions',
        'post' =&gt; $id,
        'posts_per_page' =&gt; -1,
        'meta_key' =&gt; 'ending_date',
        'orderby' =&gt; 'meta_value',
        'order' =&gt; 'DEC',
      );

      $slider_posts = new WP_Query($params);

      $array_rev = array_reverse($slider_posts-&gt;posts);
      //reassign the reversed posts array to the $home_shows object
      $slider_posts-&gt;posts = $array_rev;
    ?&gt;

    &lt;?php if ( $slider_posts-&gt;have_posts() ) while ( $slider_posts-&gt;have_posts() ) : $slider_posts-&gt;the_post(); ?&gt;          

      &lt;?php date_default_timezone_set('America/New_York'); 
        $slider_link = get_permalink();
        $starting_date = get_field('starting_date'); 
        $ending_date = get_field('ending_date'); 
        $location = get_field('location'); 
        $prod_link = get_permalink(); 
        $todays_date = date(Ymd); 

        ?&gt;


      &lt;?php if (($todays_date&lt;$ending_date) and ($todays_date&lt;$starting_date)): ?&gt;   
        &lt;div class="gallery-cell future-prod"&gt;
          &lt;a href="&lt;?php echo $slider_link; ?&gt;" class="slider-link"&gt;            
            &lt;?php the_post_thumbnail('hero'); ?&gt;

            &lt;div class="content"&gt;                  
              &lt;h3&gt;            
                &lt;?php the_title(); ?&gt;
              &lt;/h3&gt;
              &lt;p&gt;
              &lt;?php 
                $end = date_create_from_format('Ymd',$ending_date);
                $start = date_create_from_format('Ymd',$starting_date);
                echo "&lt;span class='month'&gt;" . $start-&gt;format('F') . "&lt;/span&gt;";
                echo " ";
                echo "&lt;span class='day'&gt;" . $start-&gt;format('j') . "&lt;/span&gt;";
                echo ", ";
                echo "&lt;span class='year'&gt;" . $start-&gt;format('Y') . "&lt;/span&gt;";

                echo " - ";

                echo "&lt;span class='month'&gt;" . $end-&gt;format('F') . "&lt;/span&gt;";
                echo " ";
                echo "&lt;span class='day'&gt;" . $end-&gt;format('d') . "&lt;/span&gt;";
                echo ", ";
                echo "&lt;span class='year'&gt;" . $end-&gt;format('Y') . "&lt;/span&gt;";
                echo ", $location";
               ?&gt; 
              &lt;/p&gt;
              &lt;p&gt;              
                &lt;?php echo wp_trim_words( get_the_content(), 40, '...' ); ?&gt;
              &lt;/p&gt;
              &lt;h4 class="status coming-soon"&gt;
                Coming Soon
              &lt;/h4&gt;
            &lt;/div&gt;
          &lt;/a&gt;
        &lt;/div&gt; &lt;!-- /.gallery-cell.future-pro --&gt;
      &lt;?php endif ?&gt;

    &lt;?php endwhile; ?&gt;

&lt;!-- PAST PRODUCTION --&gt;       
    &lt;?php // query posts
      $params = array(
        'post_type' =&gt; 'productions',
        'post' =&gt; $id,
        'posts_per_page' =&gt; -1,
        'meta_key' =&gt; 'ending_date',
        'orderby' =&gt; 'meta_value',
        'order' =&gt; DEC,
      );

      $slider_posts = new WP_Query($params);
    ?&gt;

    &lt;?php if ( $slider_posts-&gt;have_posts() ) while ( $slider_posts-&gt;have_posts() ) : $slider_posts-&gt;the_post(); ?&gt;          

      &lt;?php date_default_timezone_set('America/New_York'); 
        $slider_link = get_permalink();
        $starting_date = get_field('starting_date'); 
        $ending_date = get_field('ending_date'); 
        $location = get_field('location'); 
        $prod_link = get_permalink(); 
        $todays_date = date(Ymd); ?&gt;

      &lt;?php if ($ending_date&lt;$todays_date): ?&gt;   
        &lt;div class="gallery-cell past-prod"&gt;
          &lt;a href="&lt;?php echo $slider_link; ?&gt;" class="slider-link"&gt;            
            &lt;?php the_post_thumbnail('hero'); ?&gt;

            &lt;div class="content"&gt;  
              &lt;h3&gt;            
                &lt;?php the_title(); ?&gt;
              &lt;/h3&gt;
              &lt;p&gt;              
                &lt;?php echo wp_trim_words( get_the_content(), 40, '...' ); ?&gt;
              &lt;/p&gt;
              &lt;h4 class="status coming-soon"&gt;
                Past Production
              &lt;/h4&gt;
            &lt;/div&gt;
          &lt;/a&gt;
        &lt;/div&gt; &lt;!-- /.gallery-cell.past-prod --&gt;
      &lt;?php endif ?&gt;

    &lt;?php endwhile; ?&gt;


    &lt;?php $prod_link = get_permalink(11); ?&gt;
    &lt;div class="gallery-cell read-more"&gt;
      &lt;a href="&lt;?php echo $prod_link; ?&gt;" class="slider-news"&gt;
        &lt;h4 class="slider-news"&gt;READ MORE&lt;/h4&gt;
      &lt;/a&gt;
    &lt;/div&gt; &lt;!-- /.gallery-cell.read-more --&gt;
&lt;/div&gt; &lt;!-- /.gallery --&gt;
</code></pre>

<p> 
 </p>

<p>After checking the console errors in my Dev Tools, it came up with the following errors. Any Suggestions?</p>

<p>Uncaught ReferenceError: jQuery is not defined
    at jquery-migrate.min.js:2
(index):87 Uncaught ReferenceError: jQuery is not defined
    at (index):87</p>