0

I'm using applay and have created some minor customisations with a child theme.

I'm wanting to have a single product displayed without an image.

I'm using this code in my theme's functions.php

remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );

It removes the product, but still leaves an empty space in the layout where the image should be.

enter image description here

I've tried fiddling with as many css classes as I can to get the product to span the entire div, I don't know what to do.

I've tried disabling the woo commerce layout, but this gives me problems saving the product to the database when it is purchased.

Does anyone know how I can get the product to span the page?

1 Answer 1

0

I added a jquery to the footer.php in the child theme. Within that I listed all the product pages I wanted to adjust the css for. This is not ideal for sites with large content, in this case there are only two products.

For the sake of larger sites, there could possibly be some wild card at the end of the url.

<?php //if(is_post()){ ?>
<script type="text/javascript">
    jQuery(function(){

        if(window.location.href=='http://mywebsite.com.au/product/myproduct/')
        {
            jQuery('.images ').remove();
            jQuery('.summary.entry-summary.portrait-screenshot ').css('width','100%');
            jQuery('.cart ').css('width','70%');
        }
    });
</script>
<?php //} ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.