Tagged: x
-
AuthorPosts
-
June 28, 2016 at 11:18 am #1063492
MatrixFourParticipantHi 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?
June 28, 2016 at 11:27 am #1063519
MatrixFourParticipantI 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.
June 28, 2016 at 11:56 am #1063553
RupokMemberHi 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!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1063492 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
