diff --git a/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php b/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php index 8d828bdceca5ce02a5c2ce7759b4f3c1d3de2d92..1a5a25a6514bdbe5d688357dcc808d2f6fc0c564 100644 --- a/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php +++ b/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php @@ -292,7 +292,7 @@ function krown_project_grid_shortcode( $atts ) { $args['orderby'] = $orderby; } - $args['order'] = $order; + $args['order'] = 'DESC'; // Define author if present (single) @@ -311,7 +311,6 @@ function krown_project_grid_shortcode( $atts ) { } // Start query and get object - $all_posts = new WP_Query( $args ); ob_start(); diff --git a/wordpress/wp-content/themes/backer/single-ignition_product.php b/wordpress/wp-content/themes/backer/single-ignition_product.php index 40b5add0981ca0a2eb216e779c7b90213f909135..f19020a5090a07fd1a0ead14d5b4f2f91f9850d3 100644 --- a/wordpress/wp-content/themes/backer/single-ignition_product.php +++ b/wordpress/wp-content/themes/backer/single-ignition_product.php @@ -55,13 +55,15 @@ $percent = get_post_meta( $post->ID, 'ign_percent_raised', true ) != '' ? get_post_meta( $post->ID, 'ign_percent_raised', true ) : 0; $status = $post->post_status; - if($percent == 100){ - wp_update_post( array( 'ID'=>$post->ID, 'post_status' => 'completed' ) ); - $status = 'completed'; - } - if($percent != 100 && $ign_days_left == 0){ - wp_update_post( array( 'ID'=>$post->ID, 'post_status' => 'closed' ) ); - $status = 'closed'; + if($status == 'publish'){ + if($percent == 100){ + wp_update_post( array( 'ID'=>$post->ID, 'post_status' => 'completed' ) ); + $status = 'completed'; + } + if($percent != 100 && $ign_days_left == 0){ + wp_update_post( array( 'ID'=>$post->ID, 'post_status' => 'closed' ) ); + $status = 'closed'; + } } ?>