WordPress.org

Ready to get started?Download WordPress

Forums

Custom Taxonomy and archive pages (3 posts)

  1. Dillx
    Member
    Posted 1 year ago #

    I have a custom two custom taxonomies one called design_tag (tags) & one called design_category (category).

    They are both used for the custom post design.

    When I try and test for which one is active (in archives.php) using
    <?php if (is_tax( 'design_tag')); echo 'design tag'; ?>
    <?php if (is_tax( 'design_category')); echo 'design category'; ?>
    both lines are output.

    What should I be using ?

  2. Marcos Curvello
    Member
    Posted 1 year ago #

    I have a similar problem

    I have archive pages separating posts by specific taxonomy and now they do not work anymore

    http://www.boavistaja.com

  3. Dillx
    Member
    Posted 1 year ago #

    I have managed to get round it using this

    $the_tax = get_taxonomy( get_query_var( 'taxonomy' ) );
    $my_tax=$the_tax->labels->name;

    Then I test the name.

Topic Closed

This topic has been closed to new replies.

About this Topic