The line:
$post->comment_status = 'closed';
Is trying to use an undefined object. To fix, after the line:
function pr_get_page_content() {
Add this:
global $post;
When I view a product, the display is controlled by this file:
wp-content/themes/MYTHEME/single-grid_products.php
When viewing a product category, I am uncertain how to modify the displayed output using the WordPress template heirarchy. I verified that the product category page is an “archive” page, so I thought one of these files should allow me to style the category output:
wp-content/themes/MYTHEME/archive-grid_products.php
wp-content/themes/MYTHEME/archive-grid_product_category.php
But neither of those work. The only way I have been able to style the category page is by editing this file:
wp-content/themes/MYTHEME/archive.php
Anyone know how to use a more specific template for grid products?