Order the funds in short code output
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 9 Jun 2017 19:26:52 +0000 (15:26 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 9 Jun 2017 19:26:52 +0000 (15:26 -0400)
orderby title order ASC

lib/funds.php

index bc5ae1c..9429ccd 100644 (file)
@@ -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'                  => '<input type="checkbox">',
         '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 ),