Product Results page 500 error (WordPress)
-
Hello,
My products results page is giving me a 500 internal server error. Can anyone give me any advice as to why?
Link: https://bit.ly/2ae8gFV2
This is from the page throwing the error:
<?php /** * The Template for displaying product archives, including the main shop page which is a post type archive * * This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). * will need to copy the new files to your theme to maintain compatibility. We try to do this. * as little as possible, but it does happen. When this occurs the version of the template file will. * be bumped and the readme will list any important changes. * * @see https://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } $page_id = wc_get_page_id( 'shop' ); $style = (comet_meta($page_id, 'page_title_style') != '') ? comet_meta($page_id, 'page_title_style') : 'grey' ; $text_align = (comet_meta($page_id, 'title_text_align') != '') ? comet_meta($page_id, 'title_text_align') : ''; $text_transform = (comet_meta($page_id, 'title_text_transform') != '') ? comet_meta($page_id, 'title_text_transform') : ''; $page_title = (comet_meta($page_id, 'page_title') != '') ? comet_meta($page_id, 'page_title') : get_the_title($page_id); $page_subtitle = (comet_meta($page_id, 'page_subtitle') != '') ? comet_meta($page_id, 'page_subtitle') : ''; $columns_layout = ( isset( $_GET['col'] ) && in_array( $_GET['col'], array( '2', '3', '4' ) ) ) ? $_GET['col'] : ''; $get_sidebar_var = ( isset($_GET['sidebar']) && $_GET['sidebar'] == 'off' ) ? false : true; get_header( 'shop' ); ?> <article id="<?php echo esc_html($post->post_name); ?>" class="page-single"> <?php if (comet_meta($page_id, 'show_page_title') != '' && comet_meta($page_id, 'show_page_title') != 'no'): ?> <section class="page-title <?php echo esc_attr($style); ?>"> <?php if (comet_meta($page_id, 'page_title_style') != '' && comet_meta($page_id, 'page_title_style') == 'parallax'): ?> <div class="parallax-bg" data-parallax="scroll" data-image-src="<?php echo esc_url(comet_meta($page_id, 'title_bg')); ?>"></div> <div class="parallax-overlay"> <?php endif ?> <div class="centrize"> <div class="v-center"> <div class="container"> <div class="title <?php echo esc_attr($text_align); ?>"> <h1 class="<?php echo esc_attr($text_transform); ?>"><?php echo esc_attr($page_title); ?><span class="red-dot"></span></h1> <h4><?php echo esc_attr($page_subtitle); ?></h4> <hr> </div> </div> </div> </div> <?php if (comet_meta($page_id, 'page_title_style') != '' && comet_meta($page_id, 'page_title_style') == 'parallax'): ?> </div> <?php endif ?> </section> <?php endif ?> <?php /** * woocommerce_before_main_content hook. * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action( 'woocommerce_before_main_content' ); ?> <?php if (comet_options('shop_sidebar') && $get_sidebar_var): ?> <div class="row"> <?php /*?><div class="col-md-3 hidden-sm hidden-xs"> <div id="sidebar"> <?php dynamic_sidebar('shop_sidebar'); ?> </div> </div><?php */?> <div class="col-md-12"> <?php endif ?> <?php /** * woocommerce_archive_description hook. * * @hooked woocommerce_taxonomy_archive_description - 10 * @hooked woocommerce_product_archive_description - 10 */ do_action( 'woocommerce_archive_description' ); ?> <!--<h1 class="hydrochloride">Product search results for 'hydrochloride'</h1>--> <?php if ( have_posts() ) : ?> <div class="shop-menu"> <?php /** * woocommerce_before_shop_loop hook. * * @hooked woocommerce_result_count - 20 * @hooked woocommerce_catalog_ordering - 30 */ do_action( 'woocommerce_before_shop_loop' ); ?> </div> <div class="cas-row"> <div class="pro-name">Product Name</div> <div class="cas-mane">CAS#</div></div> <?php if ($columns_layout || comet_options('shop_columns')): ?> <?php $col_width = ($columns_layout) ? $columns_layout : comet_options('shop_columns') ; ?> <div class="columns-<?php echo esc_attr( $col_width ); ?>"> <?php endif ?> <?php woocommerce_product_loop_start(); ?> <?php woocommerce_product_subcategories(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php //wc_get_template_part( 'content', 'product' ); ?> <div class="enqaer"> <ul ><li class="them-mail"><a href="<?php echo get_permalink(); ?>"><?php echo get_the_post_thumbnail(); ?></a></li> <div class="show"> <li class="prod-title"><a href="<?php echo get_permalink(); ?>"><?php the_title();?></a> </li> <li class="product-name"><?php the_field ('product_name_'); ?> </li> <?php /*?> <li class="cas"><?php the_field ('sq'); ?> </li> <?php */?> <li class="cas hidden_cas"> <?php /** * woocommerce_single_product_summary hook. * * @hooked woocommerce_template_single_meta - 40 */ do_action( 'woocommerce_single_product_summary' ); ?></li> <li class="product-info"><a href="<?php the_permalink();?>"> Product info</a> </li> <li class="product-about"><a href="<?php echo get_site_url()?>/inquire/<?php echo '?proid='.get_the_id(); ?>"> Inquire about this product >></a></li> </div></ul> </div> <?php endwhile; // end of the loop. ?> <div class="container"> <div class="green-serch"> <div class="colam-serch"> <h4>Search products by name or CAS#:</h4> <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <label class="screen-reader-text" for="s"><?php _e( 'Search for:', 'woocommerce' ); ?></label> <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search Products…', 'placeholder', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'woocommerce' ); ?>" /> <div class="green-btn"> <input type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>" /> <input type="hidden" name="post_type" value="product" /> </div> </form> </div> </div> </div> <?php woocommerce_product_loop_end(); ?> <?php if ($columns_layout || comet_options('shop_columns')): ?> </div> <?php endif ?> <?php /** * woocommerce_after_shop_loop hook. * * @hooked woocommerce_pagination - 10 */ do_action( 'woocommerce_after_shop_loop' ); ?> <?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?> <?php wc_get_template( 'loop/no-products-found.php' ); ?> <?php endif; ?> <?php if (comet_options('shop_sidebar') && $get_sidebar_var): ?> </div> </div> <?php endif ?> <?php /** * woocommerce_after_main_content hook. * * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content) */ do_action( 'woocommerce_after_main_content' ); ?> </article> <?php get_footer( 'shop' ); ?> a
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Product Results page 500 error (WordPress)’ is closed to new replies.