From: Laury GvR Date: Tue, 21 Feb 2017 20:21:20 +0000 (-0500) Subject: Ordering the frontpage products by admin menu order X-Git-Tag: v1.0.13^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=0caa61e02b8a307b2f499f16b0b82768a31c1198;p=WP-Themes%2Fcapstone.git Ordering the frontpage products by admin menu order --- diff --git a/parts/shop-cats-and-products.php b/parts/shop-cats-and-products.php index d226ae9..eacdb6c 100644 --- a/parts/shop-cats-and-products.php +++ b/parts/shop-cats-and-products.php @@ -23,7 +23,8 @@ ) ), 'post_type' => 'product', - 'orderby' => 'title,' + 'orderby' => 'menu_order', + 'order' => 'ASC' ); $products = new WP_Query( $args ); if ($products->have_posts()) { ?> diff --git a/sections/front-page.php b/sections/front-page.php index db739ed..699f302 100644 --- a/sections/front-page.php +++ b/sections/front-page.php @@ -36,7 +36,7 @@
$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 "