Make sticky post with FacetWP

Ok, I figured it out myself. So maybe I can help someone out with the same question. I made a custom field TRUE / FALSE called “featured”. In facet WP I created this query: <?php return array( ‘post_type’ => ‘custom_post_type’, ‘post_status’ => ‘publish’, ‘meta_query’ => array( ‘is_featured’ => array( ‘key’ => ‘featured’, ‘compare’ => ‘EXISTS’ … Read more

Repeat array inside array through while loop

Start by creating the arguments, but leaving tax_query empty: $args = array( ‘post_type’ => ‘watches’, ‘tax_query’ => array(), ); Then in your loop you can add to tax_querywith $args[‘tax_query’][] =: $args = array( ‘post_type’ => ‘watches’, ‘tax_query’ => array(), ); foreach ( $things as $thing ) { $args[‘tax_query’][] = array( ‘taxonomy’ => $thing[‘taxonomy’], ‘field’ => … Read more