0

クライアントのサイトを一時的な URL に立ち上げたところなので、CSS と仕上げの仕上げをしている間にクライアントがデータ入力を行うことができます。しかし、サイトを立ち上げたところ、その一部が壊れていることがわかりました。原因は、カスタム投稿のスライダーでした。私のローカルホストで完全に正常に動作するため、なぜ壊れているのかわかりません。

私は Flickity と呼ばれるパッケージを使用していますが、今まで非常にうまくいっていました。私は自分のサイトで他の Flickity スライダーを使用しているので、FLickity 自体に問題がないことはわかっています。スライダーのコードの下に添付しました。

カスタム投稿はシアター プロダクションであり、最終公演日: 終了日 [ACF] に従って注文することを意図しています。

<section class="slider-prod">

私たちのプロダクション

<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 }'>


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

      $slider_posts = new WP_Query($params);
    ?>

    <?php if ( $slider_posts->have_posts() ) while ( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>          

      <?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); 
        ?>


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

                echo " - ";

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

    <?php endwhile; ?>


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

      $slider_posts = new WP_Query($params);

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

    <?php if ( $slider_posts->have_posts() ) while ( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>          

      <?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); 

        ?>


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

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

                echo " - ";

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

    <?php endwhile; ?>

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

      $slider_posts = new WP_Query($params);
    ?>

    <?php if ( $slider_posts->have_posts() ) while ( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>          

      <?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); ?>

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

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

    <?php endwhile; ?>


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

Dev Tools でコンソール エラーを確認したところ、次のエラーが表示されました。助言がありますか?

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

4

1 に答える 1

0

エラーをデバッグし、ブラウザの開発者ツールを使用してコンソール エラーを確認すると、すべてが表示されます。すべてのファイルが適切にアップロードされていないか、アップロードされたファイルとフォルダーのアクセス許可の問題である可能性があり、アクセス許可を確認して更新できます。から、filezillaまたは使用した他の ftp クライアント

于 2016-12-20T05:20:09.013 に答える