WP_Query show the posts in sequence of tags entered in Query

Question

Basicly I want to show the post in sequence of what the tags entered are.

For instance this is my Query:

$args = array(
    'post_type'              => array( 'providers' ),
    'post_status'            => array( 'publish' ),
    'tag' => array( 'speed', 'price', 'contract', 'network' ),
);                                             
$the_query = new WP_Query( $args );

I would like to show the post with the tag ‘speed’ first and ‘network’ last. I could not find a matching ‘orderby’ in the wordpress codex. I’m wondering if someone here knows how to do this.

Thank you!

0
, , Kevin M. 1 year 2020-07-13T10:10:40-05:00 0 Answers 58 views 0

Leave an answer

Browse
Browse