WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Hide_empty (3 posts)

  1. salocined
    Member
    Posted 2 years ago #

    Great plugin thank you.

    I am trying NOT to hide empty, like it's possible with get_terms.
    So I need ALL terms to be displayed, even if empty.

    I have this
    $terms = apply_filters( 'taxonomy-images-get-terms', '', array('cat' => '1', 'post_type' => array( 'post','dvd'),'taxonomy'=> 'theme'));

    Which works great, but where will I apply the Hide_empty argument?

    Thx
    S

    http://wordpress.org/extend/plugins/taxonomy-images/

  2. Michael Fields
    Themer
    Plugin Author

    Posted 2 years ago #

    Anything added to the term_argsargument will be passed - unmodified - to get_terms().

    From the docs:

    term_args (array) Arguments to pass to get_terms() as the second parameter. Default value is an empty array.

  3. salocined
    Member
    Posted 2 years ago #

    THanks Michael, sorry to bother, but I have tried few things without results.
    Can you be more specific?
    Where does the argument hide empty should be passed and how?

    Like this?
    $terms = apply_filters( 'taxonomy-images-get-terms', 'HERE?', array());

    or
    $terms = apply_filters( 'taxonomy-images-get-terms', '', array(HERE?));

    or Like that
    $terms = apply_filters( 'taxonomy-images-get-terms', 'HERE?', array(HERE?));

    HERE being
    array('hide_empty' =>0)

    thx
    s

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic