WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
[resolved] Conditional tag problem (3 posts)

  1. johnklijnen
    Member
    Posted 3 years ago #

    If I'm here: myhomepageurl/regio/limburg/?post_type=evenementen

    the following conditional tag works fine:
    <?php if ( is_tax('regio', 'limburg') ) { ?>

    But if I'm here: myhomepageurl/?eventtype=concerten&regio=limburg
    the same conditional tag doesn't work.

    How can I make the conditional tag to work?

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    You can't make is_tax() work. You can use qmt_get_query() instead:

    <?php
    $tax_query = qmt_get_query();
    if ( $tax_query['regio'] == 'limburg' ) {
    ?>
  3. johnklijnen
    Member
    Posted 3 years ago #

    Thanks, Sribu that works perfect!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic