1
I have a platform in Wordpress
where a particular category has a Custom field (a date).
You can make sure that when you show posts in this category they are sorted by the Custom field I added?
1
I have a platform in Wordpress
where a particular category has a Custom field (a date).
You can make sure that when you show posts in this category they are sorted by the Custom field I added?
3
You need to use meta_key as argument:
$args = array(
'order' => 'desc',
'meta_key' => 'prod_preco',
'orderby' => 'meta_value_num',
'post_status' => 'publish',
'post_type' => 'produtos',
);
$query = new WP_Query( $args );
...
Browser other questions tagged wordpress advanced-custom-fields order
You are not signed in. Login or sign up in order to post.