• Hi everyone.

    Firstly, Merry Christmas and Happy Holidays!

    I have created “strap” as a custom post type and in that custom post type, I created taxonomy “strap_type” and the term “vintage”.

    I used
    <?php echo get_the_term_list( get_the_ID(), 'strap_type', '', ',', '' ) ?>
    to list the term of the taxonomy. And the term has a link to it.

    So this link will be leading to a page like this:
    https://url/?taxonomy=strap_type&term=vintage

    I have found out from
    https://codex.www.ads-software.com/Template_Hierarchy and
    https://www.ads-software.com/support/topic/custom-tag-templates?replies=3
    on how to create a page template catered to taxonomy.

    I know how to create a query post to a custom page template like this

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
            query_posts("posts_per_page=8&post_type=strap&paged=$paged"); ?>

    but after many hours of research and brain power, I still could not figure out how to query posts with taxonomy and term in a taxonomy custom page template.

    The purpose of this particular page is to show or display posts from “strap” custom post type with the taxonomy “strap_type” and the term “vintage”.

    Anyone has any solutions?

  • The topic ‘Query taxonomy & term in a taxomony page template’ is closed to new replies.