Loop Split two Columns

How can one split a loop via WP_Query into two columns without having to work with two loops These would be possible with if conditional. and it is possible that for example in the left side those posts of category “A and B” and in the right side those posts of category “C and D … Read more

Two loops on archive page

From your question it is not clear which posts you want to select precisely. In any case, you clearly want to display different posts than are normally presented on the archive page. This means you will need to make a different selection in your template, using wp_query. The trick is to select the right arguments. … Read more

Transient not behaving as expected

rule of thumb is probably to use transients for simple objects (strings integers, array) as the result of unserialization of objects might be surprising and side effect might happen unless the object is fully static. IIRC, when unserializing an object PHP will also run its default constructor, which in your case will do the query … Read more

How to search for posts given post_content AND post_excerpt using WP_Query?

The only solution I could find for this was to save my two values as post_meta, then use this code: $args = array( ‘post_type’ => ‘POST_TYPE_HERE’, ‘post_status’ => ‘active’, ‘update_post_term_cache’ => false, // don’t retrieve post terms ‘meta_query’ => array( ‘relation’ => ‘and’, array( ‘key’ => ‘META1_NAME’, ‘value’ => $order_id, ‘compare’ => ‘=’, ), array( … Read more