Nested Queries of decreasing specificity

This answer just explains a possible approach and doesn’t provides with detailed code. The following approach relies more on PHP for filtering the results instead of multiple WP_Query, it uses a single WP_Query along with multiple get_post_meta() calls. Step 1: For the current post build an array using get_field() or get_post_meta() with all the necessary … Read more

Group Product Types

here is the answer for anyone else that may come across this. <?php /* Template Name: Products By Brand Template Post Type: Brand */ get_header(); // get all of the custom taxonomy terms $taxonomy = ‘product_type’; $arg_terms = array( ‘orderby’ => ‘id’, ‘order’ => ‘ASC’, ); $taxonomy_terms = get_terms($taxonomy, $arg_terms); $counter=0; $column_divide = 4; ?> … Read more

Get title color from category custom field

In the documentation, it looks like you can provide the term object to get_field(), however I’ve tended to use either taxonomy_#termid or term_#termid for example $color = get_term(‘color’, ‘category_1234); or $color = get_term(‘color’, ‘term_1234); If those down’t work, then I’d check: That your ACF field name is definitely color (and not colour, as I would … Read more