From 9a3e06444b319fa2ddda7671df1f738741932919 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 9 Jun 2017 15:26:52 -0400 Subject: [PATCH] Order the funds in short code output orderby title order ASC --- lib/funds.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/funds.php b/lib/funds.php index bc5ae1c..9429ccd 100644 --- a/lib/funds.php +++ b/lib/funds.php @@ -110,7 +110,10 @@ function funds_shortcode($atts) $custom_terms = get_terms('fund_group'); foreach($custom_terms as $custom_term) { wp_reset_query(); - $args = array('post_type' => 'fund', + $args = array( + 'post_type' => 'fund', + 'orderby' => 'title', + 'order' => 'ASC', 'tax_query' => array( array( 'taxonomy' => 'fund_group', @@ -149,7 +152,7 @@ add_shortcode( 'list-funds', 'funds_shortcode' ); function funds_admin_custom_columns($column) { global $post; - + switch ($column) { case 'fund_col_cat': $fund_cats = get_the_terms( $post->ID, 'fund_group' ); @@ -166,7 +169,7 @@ function funds_admin_custom_columns($column) } } function funds_admin_edit_columns($columns) -{ +{ $columns = array( 'cb' => '', 'title' => FUND_SINGLE . ' Title', @@ -191,7 +194,7 @@ function fund_taxonomy_filter_restrict_manage_posts() $filters = get_object_taxonomies( $typenow ); foreach ( $filters as $tax_slug ) { - + $tax_obj = get_taxonomy( $tax_slug ); wp_dropdown_categories( array( 'show_option_all' => __( 'Show All ' . $tax_obj->label ), -- 2.17.1