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

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:

?php 
/**
 * 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//aa class=header_art href=?php echo site_url(); ?/cinema/?categories=artart//aa class=header_music href=?php echo site_url(); ?/cinema/?categories=musicmusic//aa class=header_philosopy href=?php echo site_url(); ?/cinema/?categories=philosophythink//aa class=header_fashion href=?php echo site_url(); ?/cinema/?categories=fashionfashion//aa class=header_healthrx href=?php echo site_url(); ?/cinema/?categories=healthrxhealthRx//aa class=header_cinema href=?php echo site_url(); ?/cinema/?categories=cinemacinema//aa class=header_food href=?php echo site_url(); ?/cinema/?categories=foodfood//aa class=header_business href=?php echo site_url(); ?/cinema/?categories=businessbusiness//aa class=header_lovesex href=?php echo site_url(); ?/cinema/?categories=lovesexlovesex//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_holderiframe 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=errorSorry. There is no content for this category/div';


    ?

    ?php endif; ?
 

/div

?php get_footer(); ?

Here is a part of the error_log file :

[26-May-2022 19:17:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM `wp_options` made by shutdown_action_hook, do_action('shutdown'), WP_Hook-do_action, WP_Hook-apply_filters, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Autoloader::Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\{closure}, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Plugins_Handler-cache_plugins, set_transient, update_option
[28-May-2022 08:00:54 UTC] WordPress database error Commands out of sync; you can't run this command now for query UPDATE `wp_options` SET `option_value` = 'a:0:{}' WHERE `option_name` = '_transient_jetpack_autoloader_plugin_paths' made by shutdown_action_hook, do_action('shutdown'), WP_Hook-do_action, WP_Hook-apply_filters, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Autoloader::Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\{closure}, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Plugins_Handler-cache_plugins, set_transient, update_option
[28-May-2022 08:02:13 UTC] WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM `wp_options` made by shutdown_action_hook, do_action('shutdown'), WP_Hook-do_action, WP_Hook-apply_filters, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Autoloader::Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\{closure}, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Plugins_Handler-cache_plugins, set_transient, update_option
[28-May-2022 08:04:11 UTC] WordPress database error Commands out of sync; you can't run this command now for query UPDATE `wp_options` SET `option_value` = 'a:1:{i:0;s:29:\{{WP_PLUGIN_DIR}}/woocommerce\;}' WHERE `option_name` = '_transient_jetpack_autoloader_plugin_paths' made by shutdown_action_hook, do_action('shutdown'), WP_Hook-do_action, WP_Hook-apply_filters, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Autoloader::Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\{closure}, Automattic\Jetpack\Autoloader\jpdb897b9c8e0c5079b17448f17a52683a\Plugins_Handler-cache_plugins, set_transient, update_option
[31-May-2022 10:34:43 UTC] PHP Notice:  ID was called strongincorrectly/strong. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/single-product.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-single-product.php'), do_action('woocommerce_single_product_summary'), WP_Hook-do_action, WP_Hook-apply_filters, add_progress, WC_Abstract_Legacy_Product-__get, wc_doing_it_wrong Please see a href=https://wordpress.org/support/article/debugging-in-wordpress/Debugging in WordPress/a for more information. (This message was added in version 3.0.) in /home/semainec/public_html/wp-includes/functions.php on line 5229
[31-May-2022 10:34:43 UTC] PHP Notice:  product_type was called strongincorrectly/strong. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/single-product.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-single-product.php'), do_action('woocommerce_single_product_summary'), WP_Hook-do_action, WP_Hook-apply_filters, woocommerce_template_single_add_to_cart, do_action('woocommerce_external_add_to_cart'), WP_Hook-do_action, WP_Hook-apply_filters, woocommerce_external_add_to_cart, WC_Product_External-single_add_to_cart_text, apply_filters('woocommerce_product_single_add_to_cart_text'), WP_Hook-apply_filters, {closure}, WC_Abstract_Legacy_Product-__get, wc_doing_it_wrong Please see a href=https://wordpress.org/support/article/debugging-in-wordpress/Debugging in WordPress/a for more information. (This message was added in version 3.0.) in /home/semainec/public_html/wp-includes/functions.php on line 5229
[31-May-2022 10:34:43 UTC] PHP Notice:  product_type was called strongincorrectly/strong. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/single-product.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-single-product.php'), do_action('woocommerce_single_product_summary'), WP_Hook-do_action, WP_Hook-apply_filters, woocommerce_template_single_add_to_cart, do_action('woocommerce_external_add_to_cart'), WP_Hook-do_action, WP_Hook-apply_filters, woocommerce_external_add_to_cart, wc_get_template, include('/themes/Blank-Theme/woocommerce/single-product/add-to-cart/external.php'), do_action('woocommerce_before_add_to_cart_button'), WP_Hook-do_action, WP_Hook-apply_filters, WC_Points_Rewards_Product-render_product_message, apply_filters('wc_points_rewards_single_product_message'), WP_Hook-apply_filters, {closure}, WC_Abstract_Legacy_Product-__get, wc_doing_it_wrong Plea in /home/semainec/public_html/wp-includes/functions.php on line 5229
[31-May-2022 10:35:58 UTC] PHP Notice:  wpdb::prepare was called strongincorrectly/strong. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see a href=https://wordpress.org/support/article/debugging-in-wordpress/Debugging in WordPress/a for more information. (This message was added in version 4.9.0.) in /home/semainec/public_html/wp-includes/functions.php on line 5229

Topic php content theme-development Wordpress

Category Web


I found, it was really simple. It was simply my pages that did not load the template by default. The cinema page was not loading cinema.php, I simply renamed cinema.php to page-cinema.php and it works again.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.