- This topic is empty.
-
AuthorPosts
-
August 28, 2015 at 6:48 am #207313
mo_da92
ParticipantHi guys,
The product pages currently only have 3 columns for the thumbnail images and I am trying to increase it so there are fewer rows and maybe five or six columns.
This is how it currently is: http://www.gadjetsupply.com/product/aux-audio-cable/
Any help would be much appreciated!
Thanks!
August 28, 2015 at 7:38 am #207314Atelierbram
ParticipantSo if you would want to do 6 columns, you will have to go into the templates and see how those
.first
and.last
class-names on those.thumbnails a
wrapper links are applied (PHP function maybe), and move the.first
class from every fourth link, to every seventh link, and the.last
class on every third link, to every sixth link.then adapt the stylesheet:
.et_right_sidebar.woocommerce-page div.product div.images div.thumbnails a { width: 11.66666% !important; margin-right: 6%; }
August 28, 2015 at 8:39 am #207319mo_da92
ParticipantThanks for the response Atelierbram, but I don’t really understand what I have to do. Is there no easier way to do it than what you mentioned above?
I tried adding the code to my css but it did not work unfortunately.
August 28, 2015 at 9:51 am #207325Atelierbram
ParticipantFirst you have to find out where the
single-product.php
(or whatever name it’s called) lives. You can find out by adding this php-snippet somewhere infooter.php
<footer id="main-footer"> <div class="container"> <?php if ( current_user_can( 'administrator' ) ) { global $wpdb; echo "<pre>"; print_r( $wpdb->queries ); echo "</pre>"; } ?> <!-- stuff --> </div> </footer>
This will echo out a huge blob of info about the templates being used in the page (at the bottom of the page after refreshing the page).
When you think you see something that looks like
single-products
or something, then you can go start looking for the.thumbnails
, and see if you can tweak the PHP code like I described above.Is there no easier way to do it than what you mentioned above?
Who told you web-development was easy?
I tried adding the code to my css but it did not work unfortunately.
It can’t work without you modifying the HTML/PHP, doing it like this, but it’s the cleanest way. There is one other way to achieve this with only
CSS
, but that one is more “hacky”; you really should try this first.September 2, 2015 at 6:20 am #207463mo_da92
ParticipantThanks for the help Atelierbram, but I will not attempt something this complex in case something goes wrong. I will leave it as 3 columns for now :)
September 2, 2015 at 6:35 am #207464Atelierbram
ParticipantIf you don’t mind me asking; what is your workflow with editing the
CSS
on this website? Do you work locally, or remotely on the server? -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.