WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
Taxonomy woes (3 posts)

  1. deadhippo
    Member
    Posted 3 years ago #

    I tried using this :

    A Registered Taxonomy
    is_taxonomy() ( deprecated in 3.0 in favor of taxonomy_exists() )
    When a particular taxonomy is registered via register_taxonomy().

    to get a widget to show only on posts of a certain taxanomy but it didn't seem to work.

    I tried both

    is_taxonomy('color','black')
    taxonomy_exists('color','black').

    The widgets displayed on every page.

    Any ideas?

    http://wordpress.org/extend/plugins/widget-logic/

  2. bluebird2
    Member
    Posted 3 years ago #

    I think you need to use this:
    is_post_type_hierarchical($post_type)
    Returns true if this $post_type has been set with hierarchical support when registered.
    is_post_type_hierarchical('book')
    Returns true if the book post type was registered as having support for hierarchical.

  3. alanft
    Member
    Plugin Author

    Posted 3 years ago #

    having just looked into this, I think you need something like

    get_post_type()=='book'

    see: http://codex.wordpress.org/Conditional_Tags#A_Post_Type

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic