php – For some time, some of my pages do not display the content anymore. Any idea where this could be coming from?

Question

I recently worked on this website : https://semaine.com/
But since some time the content of the pages https://semaine.com/classroom/ and https://semaine.com/cinema/ are not displayed anymore.
The pages load, the navbar and the footer are there but not the content.
It works locally on my computer with MAMP but not online.
I tried several things like disabling various plugins, re-generating links, restoring the theme from my local version, …
Here is the content of the cinema.php file:

/**
 * Template Name: cinema
 * description: cinema
 */
?> 

<?php get_header(); ?>

<?php 

  if($_GET && $_GET['categories']){

      $cat = $_GET['categories'];

    }

      // args
      $args = array(
        // 'numberposts' => -1,
        'posts_per_page'=> -1,
        'post_type'   => 'tastemakers_people',
        'category_name'  => $cat,
        'order'       => 'DESC',
      );

// query
$the_query = new WP_Query( $args );

?>

<div class="tastemakers_video">

 <div class="tastemakers_people_header styleBB" style="display:none;">
 <a class="header_all" href="<?php echo site_url(); ?>/cinema/">all/</a><a class="header_art" href="<?php echo site_url(); ?>/cinema/?categories=art">art/</a><a class="header_music" href="<?php echo site_url(); ?>/cinema/?categories=music">music/</a><a class="header_philosopy" href="<?php echo site_url(); ?>/cinema/?categories=philosophy">think/</a><a class="header_fashion" href="<?php echo site_url(); ?>/cinema/?categories=fashion">fashion/</a><a class="header_healthrx" href="<?php echo site_url(); ?>/cinema/?categories=healthrx">healthRx/</a><a class="header_cinema" href="<?php echo site_url(); ?>/cinema/?categories=cinema">cinema/</a><a class="header_food" href="<?php echo site_url(); ?>/cinema/?categories=food">food/</a><a class="header_business" href="<?php echo site_url(); ?>/cinema/?categories=business">business/</a><a class="header_lovesex" href="<?php echo site_url(); ?>/cinema/?categories=love&sex">love&sex/</a>

  </div>

  <?php
    wp_nav_menu( array( 
      'theme_location' => 'menu-sub-nav-cinema', 
      'container_class' => 'sub-nav' 
      )
    ); 
  ?>
 

 <div class="cinema">

  

  <?php if( $the_query->have_posts() ): ?>
      <?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
      
        <?php if( get_field('watch_copy') ): ?>
        
            <!-- <?php the_field('watch_copy'); ?> -->
            <div class="tastemaker_video_holder">
            <div class="video_intro"><?php the_field('watch_intro'); ?></div>
          
               <div class="video">


               <div class="video_holder"><iframe width="100%" height="100%" src="https://www.youtube.com/embed/<?php the_field('watch_copy'); ?>" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>

              </div>
            </div>

          

      <?php endif; ?>

     <?php endwhile; ?>  

     </div>  

   <?php else: 

    echo '<div class="error">Sorry. There is no content for this category</div>';


    ?>

    <?php endif; ?>
 

</div>

<?php get_footer(); ?>```

0
Hugo 2 months 2022-06-01T04:34:39-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse