Follow Brian Li (@DecryptoBL) on Twitter.
Follow Brian Li (@bwhli) on Instagram.

How to Order Downloads Alphabetically in Checkout Theme

February 19, 2015

Checkout is a new WordPress theme from the awesome people at Array. It’s designed to be used with the free Easy Digital Downloads plugin, and it’s quickly become my favorite digital product marketplace theme. In this tutorial, you’ll learn how to order products and downloads alphabetically in Checkout’s downloads page template.

Before you start, make sure you download, install, and activate the Checkout child theme. This will ensure any changes you make will stay intact following theme upgrades.

After activating the child theme, create a folder in the child theme folder called templates. Then copy the template-downloads.php file from Checkout’s templates folder into your child theme’s templates folder.

Edit the new template-downloads.php file.

Find this:

$args = array(
'post_type' => 'download',
'posts_per_page' => apply_filters( 'checkout_download_num', 12 ),
'paged' => $paged,
);

Replace it with this:

$args = array(
'post_type' => 'download',
'posts_per_page' => apply_filters( 'checkout_download_num', 12 ),
'paged' => $paged,
'orderby' => 'title',
'order' => 'asc',
);

Questions?

Find me on Twitter, or send me an email.