Archived topic
Possible to swap position of Product Title and Product Images on mobile?
5 replies · Started by Shaun on January 31, 2019
Hi guys, on mobile, the product images are at the top while the product title is below them. I was wondering, is it possible to swap their positions, and if so, how can I do it?
Hi there,
is this for the Single Product or the shop loops?
Hey David, just for the single product pages.
Slightly tricker that one :)
1. Create a new Hook Element
Add this to the content:
<?php
$mobile_title = woocommerce_template_single_title();
echo $mobile_title;
?>
Hook = woocommerce_before_single_product
Check execute PHP
And set your display rules to Product > All Products
Then this CSS to switch which one displays for each device:
@media (max-width: 768px) {
.woocommerce.single-product .entry-summary .product_title {
display: none !important;
}
}
@media (min-width: 769px) {
.woocommerce.single-product .entry-content > .product_title {
display: none;
}
}
That works! I am so glad I renewed my GP license. Thank you so much David! :D
Awesome - glad to be of help!