Woocommerce: I want to show only product gallery images with description in a fancybox

I am a newbie to woocommerce. I need a php code to show only product gallery images with discription in a fancybox.

please help

Related posts

Leave a Reply

2 comments

  1. Have you copied the ‘templates’ folder from woocommerce into your own custom template folder yet? If not, do so.

    In that folder, create a file called ‘woo-functions.php’ or something like that. In your functions.php require this file like so: require_once('woocommerce/woo-functions.php');
    (In this scenario, I renamed the ‘templates’ folder into ‘woocommerce’.

    In the woo-functions file you can remove the hooks that woocommerce are using. For example, if you want to remove the breadcrumb do:

    remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
    

    Or, to remove things like price, meta data and sharing stuff:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );
    

    All these can be found on the individual pages in which woocommerce is build. For example, you probably mostly want to customize the ‘content-single-product.php’ file. This is where most of the product page is build. The ‘remove_actions’ can be set there also, but it’s much clearer to do with this kind of method.

    In the ‘content-single-product.php’ file you can also just customize the markup. So that’s probably where you want your fancybox div to go.


    Extra info at:

    http://docs.woothemes.com/documentation/plugins/woocommerce/woocommerce-codex/theming/
    http://docs.woothemes.com/document/hooks/

  2. Thanks Luc
    This worked also in short-description.php:

    <div class="moreinfo-title"><?php the_title(); ?></div>
    <div itemprop="description">
    <div class="moreinfo-description"><?php the_content(); ?></div>
    </div>
    <div id="moreinfo-thumbnails"><?php do_action( 'woocommerce_product_thumbnails' ); ?>