Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Michael Fields

    (@mfields)

    Great idea. I added this to the latest release + fixed a few minor issues with WP_DEBUG set to true. As of version 0.3, you can now filter the text. Here are a few examples:

    /**
     * Filter dropdown text for all taxonomies.
     */
    add_filter( 'taxonomy-widget-show-option-none', 'mytheme_show_options_none' );
    function mytheme_show_options_none( $text ) {
    	return 'Custom text for all taxonomies.';
    }
    /**
     * Filter dropdown text for the category taxonomy.
     */
    add_filter( 'taxonomy-widget-show-option-none-category', 'mytheme_show_options_none_category' );
    function mytheme_show_options_none_category( $text ) {
    	return 'Custom category text.';
    }
    /**
     * Filter dropdown text for the post_tags taxonomy.
     */
    add_filter( 'taxonomy-widget-show-option-none-post_tag', 'mytheme_show_options_none_tags' );
    function mytheme_show_options_none_tags( $text ) {
    	return 'Custom tag text.';
    }
    Thread Starter cjk

    (@loomeinimene)

    Sweet ??
    But if I am using 2 or more Taxonomy widgets on page, how to give each a different ‘Please Choose’ text?

    Plugin Author Michael Fields

    (@mfields)

    Do you have 2 dropdowns for the same taxonomy on one page?

    Thread Starter cjk

    (@loomeinimene)

    No. I have 2 dropdowns for separate taxonomys.

    Plugin Author Michael Fields

    (@mfields)

    Right on. Looks at the bottom two code snippets in my post above. One changes only categories while the other changes only tags. You can use the same type of filter for any custom taxonomy that you have set up. The filter slug is dynamic:

    ‘taxonomy-widget-show-option-none-taxonomy-name

    Thread Starter cjk

    (@loomeinimene)

    Oh, got it ??
    Thanks for fast responds!

    Plugin Author Michael Fields

    (@mfields)

    No problem. Please mark thread as resolved if this solved your problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Taxonomy Widget] Change 'Please Choose'’ is closed to new replies.