
Hi All,
I would like a piece of advice on this. I am creating an archive page for a custom post which have both featured and regular posts. Featured posts are supposed to be be a top and a different grid element than regular ones.
I am evaluating 3 way of doing it and I would like to know which is the best thinking on performance, I mean is there a important difference regarding that or they are just similar?
1. The first one is to have a taxonomy and filtering post which has the ‘featured’ term set. I will be filtering them on the template php file with a wp_query like this:
$featured_query = new WP_Query(array(
'post_type' => 'noticias',
'tax_query' => array(
array(
'taxonomy' => 'status',
'field' => 'slug',
'terms' => 'featured',
),
),
2. Via a custom field using the approach shown in this tutorial
https://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/
3. Via a custom field following these examples (which way is best?)
https://www.advancedcustomfields.com/resources/query-posts-custom-fields/
I prefer the 3rd option, is this the best one?
Many thanks!