Skip to content

Instantly share code, notes, and snippets.

@DevinVinson
Created March 14, 2014 23:51
Show Gist options
  • Save DevinVinson/9559479 to your computer and use it in GitHub Desktop.
Save DevinVinson/9559479 to your computer and use it in GitHub Desktop.
Change the Enfold single product page layout
#
# 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>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment