WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Query Multiple Taxonomies] multiple custom post type filter

[Plugin: Query Multiple Taxonomies] multiple custom post type filter

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author scribu
    Member

    @scribu

    By passing an array, you expect to get a list containing posts with more than one post type?

    tiagoalves83
    Member

    @tiagoalves83

    Exactly! Is it possible?

    I had an idea. Can you help me with the development?
    It would be very nice, if inside the Drill Down Widget we could select a custom post type (from a list) and one of the taxonomies associate with that custom post type (auto loaded after we select the custom post type) and the widget would search by that custom post type and taxonomy. No more need for the filter function…
    Is it possible to do something like this ?

    Plugin Author scribu
    Member

    @scribu

    That sounds like a good idea, except a taxonomy can be associated to multiple post types, which opens a whole new can of worms.

    Plugin Author scribu
    Member

    @scribu

    In the development version, the widget now has a Post Type dropdown, but the query is not restricted to that post type.

    This means that you shouldn’t share taxonomies between post types if you want only one post type to be shown.

    tiagoalves83
    Member

    @tiagoalves83

    Nice!

    You said that “the query is not restricted to that post type. But is the query restricted to any post type? Do I still need the filter function to use custom post type?

    If I share taxonomies to different post types, the plugin will be able to query all post types associated to that taxonomy? (this sounds good …)

    Plugin Author scribu
    Member

    @scribu

    You said that “the query is not restricted to that post type. But is the query restricted to any post type?

    It’s restricted to public post types – i.e. no revisions etc.

    If I share taxonomies to different post types, the plugin will be able to query all post types associated to that taxonomy? (this sounds good …)

    Yes: For example, if you have a ‘color’ taxonomy associated to both ‘cars’ and ‘bicycles’ post types, when you go to ?tag=sporty&color=red, you would get any car or bicycle that matches that query.

    PS: This is the default WordPress behaviour when you visit a single taxonomy archive.

    Plugin Author scribu
    Member

    @scribu

    Do I still need the filter function to use custom post type?

    No, that filter doesn’t exist anymore.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Query Multiple Taxonomies] multiple custom post type filter’ is closed to new replies.