- This topic has 3 replies, 2 voices, and was last updated 4 years, 1 month ago by .
-
Topic
-
I Created a data field Thus:
add_filter( 'rwmb_meta_boxes', 'register_meta_boxes' ); function register_meta_boxes( $meta_boxes ) { $meta_boxes[] = array( 'title' => __( 'Data corso/evento'), 'post_types' => 'product', 'fields' => array( array( 'name' => __( 'Giorno evento' ), 'id' => 'day_event', 'type' => 'date', 'js_options' => array( 'autoSize' => true, 'buttonText' => __( 'Select Date' ), "dateFormat" => "dd/mm/yy", 'numberOfMonths' => 1, 'showButtonPanel' => true, ), 'inline' => true, ) ), ); return $meta_boxes; } and placed in my shortcode: $options = array( 'post_type' => $post_type, 'product_cat' => $product_cat, 'posts_per_page' => $posts_per_page, 'meta_key' => 'day_event', 'orderby' => 'meta_value', 'order' => 'ASC', );
How can I do that reorder by date?
thank you!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.