Hi all,
i want reorder post in avia_post_slider ,
i need view post type “eventi” ordered with meta_key ‘_eventi_data_end’ asc where date in ‘_eventi_data_end’ are >= today.
i write this code but dont work good, where i wrong?
$atts = array(
‘type’ => ‘grid’,
‘items’ => get_option(‘posts_per_page’),
‘columns’ => 3,
‘class’ => ‘avia-builder-el-no-sibling’,
‘paginate’ => ‘yes’,
‘use_main_query_pagination’ => ‘yes’,
‘custom_query’ => array(
‘meta_query’ => array(
array(
‘key’ => ‘_eventi_data_end’,
‘value’ => date(“Y-m-d”,strtotime(“today”)),
‘compare’ => ‘>=’,
‘type’ => ‘DATE’
)
),
‘meta_key’ => ‘_eventi_data_end’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘ASC’,
‘post_type’=>get_post_types()
),
);
$blog = new avia_post_slider($atts);
Hey webevoit,
Can we ask, what exact file and line you put this code?
Best regards,
Nikko