Ordering the frontpage products by admin menu order
authorLaury GvR <laury@gaslightmedia.com>
Tue, 21 Feb 2017 20:21:20 +0000 (15:21 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 21 Feb 2017 20:21:20 +0000 (15:21 -0500)
parts/shop-cats-and-products.php
sections/front-page.php

index d226ae9..eacdb6c 100644 (file)
@@ -23,7 +23,8 @@
                     )
                 ),
                 'post_type' => 'product',
-                'orderby' => 'title,'
+                'orderby' => 'menu_order',
+                'order' => 'ASC'
             );
             $products = new WP_Query( $args );
             if ($products->have_posts()) { ?>
index db739ed..699f302 100644 (file)
@@ -36,7 +36,7 @@
         <div id="front-shop" class="block-column row small-up-1 medium-up-2 large-up-4" data-equalizer>
         <?php $args = array(
              'number'     => $number,
-             'orderby'    => 'title',
+             'orderby'    => 'menu_order',
              'order'      => 'ASC',
              'hide_empty' => $hide_empty,
              'include'    => $ids
@@ -72,7 +72,8 @@
                                     )
                                 ),
                                 'post_type' => 'product',
-                                'orderby' => 'title,'
+                                'orderby' => 'menu_order',
+                                'order' => 'ASC'
                             );
                             $products = new WP_Query( $args );
                             echo "<ul>";