[Resolved] How to define a taxonomy term?
Is there a way to list the pages that are under a current taxonomy term? I have been able to get it to display the pages when the taxonomy term is hardcoded, but I can’t figure out how to get the term for the current page and put it in a wp_query. The reason for not having it be hardcoded is so that as the user is navigating, the taxonomy term would change accordingly.
Is there a way I can replace ‘hardcodedterm’ with ‘$currentartist’ or something similar?
This is what I am using to display the list for the ‘hardcodedterm’.
<?php $query = new WP_Query( array( 'artist' => 'hardcodedterm', 'post_type' => 'page' ) );?> <ul> <?php while ( $query->have_posts() ) : $query->the_post();?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile;?> </ul>
- The topic ‘[Resolved] How to define a taxonomy term?’ is closed to new replies.