Tag Info

New answers tagged

1

You can use the parent argument in get_terms() to get direct children of a term. You can use the child_of argument to get all descendents of a term. Something like this. $parent_id = 32; $args = array( 'parent' => $parent_id ); $terms = get_terms( $taxonomy, $args ); print_r( $terms ); If you want to programmatically get parent terms and within ...


0

For the record I found an answer to this question in the end - I needed to use a meta query rather than a taxonomy query. The correct code ended up being this: $relatedBlogPostArgs = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 1, 'order' => 'DESC', 'orderby' => 'date', 'meta_query' ...


1

Archive pages A & B already exist as your brand and type term archives, you can style those differently by creating taxonomy-brand.php and taxonomy-type.php templates. The remaining piece is two different single product views. The simplest way to achieve that would be to append a GET var onto the permalinks: ...


1

This turned out to be a quite extensive little project for me. BASIC IDEA My approach was to go with a custom archive page as this seems to be the best approach here. The thing with custom taxonomies is that if you have a structure in place, changing that would become a real messy expedition. Also, I always try to stay away from custom queries if ...



Top 50 recent answers are included