Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #7827

    I was wondering if it was possible to order the product (just a simple product) gallery images in a certain way? I’ve tried the select/drag in the WordPress gallery, but it doesn’t affect the product thumbnails.

    I found this thread on WooThemes for one of their themes:

    Would it be as simple as adding:

    ‘orderby’ => ‘menu_order’

    ‘order’ => ‘ASC’

    to a certain line in the woocommerce_template_functions.php file? Or does one of the Adundance theme files need to be modified?



    It looks like that plugin just orders products?

    I’m looking to order the thumbnail photos that show below the featured photo next to a simple product. See this screenshot, I would like to order the many thumbnails photos that show below the main product photo, the drag/move in the WordPress gallery doesn’t seem to work.


    I’m sorry but I don’t think it’s easily possible to order the attached images. Maybe there’s a plugin out there which can do this but I haven’t used one yet.


    Hi there,

    Yes just add the two lines of code into the file you mentioned so it looks like this… and it works..

    if (!function_exists(‘woocommerce_show_product_thumbnails’)) {

    function woocommerce_show_product_thumbnails() {

    global $_product, $post;

    echo ‘<div class=”thumbnails”>';

    $thumb_id = get_post_thumbnail_id();

    $small_thumbnail_size = apply_filters(‘single_product_small_thumbnail_size’, ‘shop_thumbnail’);

    $args = array(

    ‘orderby’ => ‘menu_order’,

    ‘order’ => ‘ASC’,

    ‘post_type’ => ‘attachment’,

    ‘numberposts’ => -1,

    ‘post_status’ => null,

    ‘post_parent’ => $post->ID,

    ‘post__not_in’ => array($thumb_id),

    ‘post_mime_type’ => ‘image’,

    ‘meta_query’ => array(




    Thanks for the code snippet :)



Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Order of product gallery’ is closed to new replies.