• Resolved sam

    (@samjoelnang)


    I have a custom taxonomy “artists” that has artist names (e.g., Black Hibiscus) as terms (created with CPT UI). I wanted to customize the archive for the artists in that it will display posts categorized/tagged as Album Reviews and Track Reviews that pertain to them, if any.

    To achieve this, I use the following code:

    Album reviews

    [display-posts taxonomy="artists" tax_term="black-hibiscus" category="album-reviews" tag="album-reviews" posts_per_page="3" image_size="thumbnail" include_author="true" include_date="true" date_format="F j, Y" orderby="date" wrapper="div" wrapper_class="display-posts-listing grid" meta_key="_thumbnail_id]

    Track reviews

    [display-posts taxonomy="artists" tax_term="black-hibiscus" category="track-reviews" tag="track-reviews" posts_per_page="3" image_size="thumbnail" include_author="true" include_date="true" date_format="F j, Y" orderby="date" wrapper="div" wrapper_class="display-posts-listing grid" meta_key="_thumbnail_id]

    However, this results in all posts categorized/tagged as “album reviews” and “track-reviews” being shown respectively, seemingly disregarding the specified custom taxonomy and term.

    I have tried removing category="album-reviews" tag="album-reviews" and category="track-reviews" tag="track-reviews" and ended up with all posts being displayed, still disregarding the taxonomy="artists" tax_term="black-hibiscus" rule.

    I have also tried writing the code this way:

    Album reviews

    [display-posts taxonomy="category" tax_term="album-reviews" taxonomy_2="post_tag" tax_2_term="album-reviews" taxonomy_3="artists" tax_3_term="black-hibiscus" tax_relation="AND" posts_per_page="3" image_size="thumbnail" include_author="true" include_date="true" date_format="F j, Y" orderby="date" wrapper="div" wrapper_class="display-posts-listing grid" meta_key="_thumbnail_id]

    Track reviews

    [display-posts taxonomy="category" tax_term="track-reviews" taxonomy_2="post_tag" tax_2_term="track-reviews" taxonomy_3="artists" tax_3_term="black-hibiscus" tax_relation="AND" posts_per_page="3" image_size="thumbnail" include_author="true" include_date="true" date_format="F j, Y" orderby="date" wrapper="div" wrapper_class="display-posts-listing grid" meta_key="_thumbnail_id]

    This does not work either.

    Any advice is appreciated.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter sam

    (@samjoelnang)

    I found a better way to dynamically display posts pertaining to an artist by incorporating the Display Posts shortcode into the taxonomy-artists.php template and getting the current artist’s slug. However, the shortcode still only recognizes the category and tag rules, not the taxonomy (“artists”) and term (e.g., “black-hibiscus”) ones.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.