Hey,
I'm having a bit of trouble writing the correct query for this. I want to do the following
1) Build an archive for each individual artist mentioned on my site. I have managed this (see: http://plastik.me/artist/summer-camp-2/)
2) On that page I want to display all of the albums by that particular artist. Thus far, I have been tagging each album review post with a 'review' category.
However, when it comes to doing the query that only displays 'albums' by the artist, I can't manage to write the code. My thinking is that something like this will do:
$args = array(
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'artist',
'field' => 'slug',
'terms' => array( '[I need something that will echo the artist archive here]' )
),
array(
'taxonomy' => 'category',
'field' => 'id',
'terms' => array( 1424 ),
)
)
);
$query = new WP_Query( $args );
Can anyone enlighten me on the following:
1) Is this the correct query to use?
2) How can I make the 'artist' dynamic so that I don't have to hard code it for each artist?
Thanks,
Marc