Home Forums General Issues Post filtering in archive page


Post filtering in archive page

    • gb3k

    • January 10, 2019 at 10:20 am

    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(
    			'taxonomy' => 'status',
    			'field'    => 'slug',
    			'terms'    => 'featured',

    2. Via a custom field using the approach shown in this tutorial

    3. Via a custom field following these examples (which way is best?)

    I prefer the 3rd option, is this the best one?

    Many thanks!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.