admin管理员组文章数量:1321067
I'm new to Wordpress/WooCommerce and I'm trying to do something I thought would have been simple.
The very basic WooCommerce Single Product page has the Product Attributes, they all appear under one big column.
Where can I actually modify the style and css for Product Page, so that I can have them in 2 (or more) columns instead of one big row?
I see the table is itself is generated under class "woocommerce-product-attributes" and "shop_attributes" ?
I'm new to Wordpress/WooCommerce and I'm trying to do something I thought would have been simple.
The very basic WooCommerce Single Product page has the Product Attributes, they all appear under one big column.
Where can I actually modify the style and css for Product Page, so that I can have them in 2 (or more) columns instead of one big row?
I see the table is itself is generated under class "woocommerce-product-attributes" and "shop_attributes" ?
Share Improve this question asked Sep 29, 2020 at 19:21 RainRain 1112 bronze badges1 Answer
Reset to default 1You've actually done most of the work finding this by identifying the classes (good job!). All you then had to do was to grep the WooCommerce code for those two - and you'll find them both in templates/single-product/product-attributes.php.
So all you need to do to restructure the table is to override the single-product/product-attributes.php template and build the table as you'd like. You'll need to add this to your theme, or make a child theme, and include the modified version there. From the WooCommerce docs:
- Template structure & Overriding templates via a theme - How to edit files
- Declaring WooCommerce support in themes
(I don't think it's possible to restructure the table by CSS alone, since this is an HTML table with one TR per attribute - I think you'll have to change the HTML. But I may be wrong.)
本文标签: WooCommerce Product Page css
版权声明:本文标题:WooCommerce Product Page css 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742092382a2420345.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论