Hello There,
Thanks for updating in!
1.)To resolve your issue and add “entry-wrap” only in the shop page, you can add a condition out of it. For example contents of the wp-content/themes/x-child/framework/views/{your-stack}/woocommerce.php
file:
<?php
// =============================================================================
// VIEWS/INTEGRITY/WOOCOMMERCE.PHP
// -----------------------------------------------------------------------------
// WooCommerce page output for Integrity.
// =============================================================================
?>
<?php get_header(); ?>
<div class="x-container max width offset">
<div class="<?php x_main_content_class(); ?>" role="main">
<?php if ( is_shop() ) : ?>
<div class="entry-wrap">
<?php endif; ?>
<?php woocommerce_content(); ?>
<?php if ( is_shop() ) : ?>
</div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
I am using Integrity stack as an example. You may use this as a guide on how you can add a conditional div tag only in the shop page.
2.) For the custom shop page class, you can do this by editing your shop page and find the Page Settings > Body CSS Classes.
And then this code in your child theme’s functions.php to make sure that the body class will get reflected to the page output.
// Display Body CSS classes in the shop page
// =============================================================================
function my_custom_class($output){
if( is_shop() ) {
$shopID = get_option( 'woocommerce_shop_page_id' );
$custom_class = get_post_meta( $shopID, '_x_entry_body_css_class', true );
$output[] = $custom_class;
}
return $output;
}
add_filter( 'body_class', 'my_custom_class' );
// =============================================================================
Hope this helps. Please let us know how it goes.