TC Custom Taxonomy Filter
Not showing taxonomies associated to more than 1 custom post type (1 post)

  1. fcingolani
    Posted 3 years ago #

    When a taxonomy is associated to more than one post type, it doesn't show up in the filters list. This happens because of how wp_filter_object_list works (used by get_taxonomies). I've come up with a workaround that suits my needs, use it freely if you want to.

    I've replaced the original tc_ctf_get_filters function with these two:

    function tc_ctf_exclude_builtin($tax){
        return $tax->_builtin == false;
    // Get only the custom taxonomies associated with this post type
    function tc_ctf_get_filters() {
        global $typenow;
        $taxonomies = get_object_taxonomies($typenow, 'objects' );
        return array_keys(array_filter($taxonomies, 'tc_ctf_exclude_builtin'));

    Thanks for this plugin!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TC Custom Taxonomy Filter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by fcingolani
  • This topic is not a support question
  • WordPress version: 3.5.1


No tags yet.