WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
[resolved] is_multitax() in Widget Logic (5 posts)

  1. smdever
    Member
    Posted 3 years ago #

    Hi Scribu,

    Sorry if this is a better question for the widget logic forum, but I thought you might know more about using is_multitax ().

    is_multitax() works fine in widget logic for displaying my widgets on all multitax pages, but I wanted to refine it further so that:

    Widget A displays on multitax pages where taxonomies A and C are being queried and
    Widget B displays on multitax pages where taxonomies B and C are being queried.

    do you know of any way to define my logic to achieve that?

    Thanks so much!
    Sarawan

    http://wordpress.org/extend/plugins/query-multiple-taxonomies/

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    In the development version (1.3-alpha6), I've added a parameter to is_multitax(). You can use it like this:

    is_multitax( array( 'taxonomy_a', 'taxonomy_b' ) )

  3. smdever
    Member
    Posted 3 years ago #

    Hi, thanks again for your quick response!

    I downloaded the development version you linked to above - for some reason, the example you gave me above didn't work, but this modification did:

    is_multitax( array( 'a', 'b') )

    so I am very happy. Thank you!

  4. smdever
    Member
    Posted 3 years ago #

    duh, I now realize that the example I used was the one you intended, but I took you literally and wrote out "taxonomy_" before the taxonomy name. I am clearly new to this!

  5. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Yeah, I guess I could have wrote something like:

    is_multitax( array( 'color', 'shape' ) )

    where 'color' and 'shape' are taxonomy names.

    You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic