diff --git a/class-wds-react-post-search.php b/class-wds-react-post-search.php index cc674b0..11d5936 100644 --- a/class-wds-react-post-search.php +++ b/class-wds-react-post-search.php @@ -3,7 +3,7 @@ * Plugin Name: WDS React Post Search * Description: Power up the basic WordPress search with React. * Plugin URI: https://www.webdevstudios.com - * Version: 1.0.2 + * Version: 1.0.3 * * With help from: * https://www.ibenic.com/wordpress-react-search/ @@ -391,6 +391,8 @@ public function search_posts( $request ) { 'post_type' => $this->get_valid_search_post_types( $request ), 's' => sanitize_text_field( $request['s'] ), 'tax_query' => apply_filters( 'wds_react_post_search_tax_query', array() ), + 'order' => apply_filters( 'wds_react_post_search_order', 'DESC' ), + 'orderby' => apply_filters( 'wds_react_post_search_orderby', 'date' ), ]; // Get posts. diff --git a/package.json b/package.json index 9cd5c32..554fbcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wds-react-post-search", - "version": "1.0.2", + "version": "1.0.3", "description": "Power up the basic WordPress search field with React.", "main": "assets/js/public.js", "dependencies": {