Hello,
I want to have the left sidebar on a shop page display at the bottom in mobile view. This code from GitHub seems to do the trick, but its always on. I removed it for now, anyway to display this on mobile only?
#
# wrap single product image in an extra div
#
add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_image_div’, 2);
add_action( ‘woocommerce_before_single_product_summary’, ‘avia_close_image_div’, 20);
function avia_add_image_div()
{
echo “<div class=’four units single-product-main-image alpha’>”;
}
function avia_close_image_div()
{
global $avia_config;
$avia_config[‘currently_viewing’] = “shop_single”;
echo “</div>”;
}
#
# wrap single product summary in an extra div
#
add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_summary_div’, 25);
add_action( ‘woocommerce_after_single_product_summary’, ‘avia_close_summary_div’, 3);
function avia_add_summary_div()
{
echo “<div class=’five units single-product-summary’>”;
}
function avia_close_summary_div()
{
echo “</div>”; //close out the summary
echo “<div class=’three units single-product-sidebar’>”;
get_sidebar();
echo “</div>”;
}
Thank you!
Chris
Hey ind-image,
Thank you for using Enfold.
Please follow this tread.
// https://kriesi.at/support/topic/sidebar-rechts-single-page/#post-580220
If you want to hide the sidebar on desktop, add this css code.
@media only screen and (min-width: 768px) {
/* Add your Desktop Styles here */
.single-product .sidebar { display: none !important; }
}
Best regards,
Ismael
Hello,
Thank you for your help, this ticket can be closed.
Thank you,
Chris