Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1063492
    MatrixFour
    Participant

    Hi Guys,

    I have managed to have my shop page load into 3 columns by editing the loop-start.php file in my child theme.

    I am using this to check if the page is on shop then apply the cols-3 class.

    <?php 
      if ( is_shop() ) {
    
        ?><ul class="products cols-3"><?php
    
      }else{
    	  
    	  ?><ul class="products<?php echo $column_class; ?>"><?php
    	  }
    ?>

    This works fine but I noticed that when doing this manually, the last li item is not getting the last class attached to it. How can I resolve this? I want that last item to have the “last” class added.

    Is there somewhere I can edit this just on the shop page?

    #1063519
    MatrixFour
    Participant

    I was able to override this by using a custom css style.

    .woocommerce li.product:last-child{
    	margin-right:0!important;
    	}

    But I rather not hack it will css and have it reflected in my child theme.

    Please let me know if there is a solution.

    #1063553
    Rupok
    Member

    Hi there,

    Thanks for writing in! I think the CSS fix would be easier for this. If that solve your issue, you can keep this.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1063492 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>