WordPress.org

Forums

[resolved] Query Multiple Taxonomies doesnt show custom taxonomies (21 posts)

  1. Samuel Aguilera
    Member
    Posted 4 years ago #

    Hi!

    The Query Multiple Taxonomies widget only shows default taxonomies (Categories and Tags), none of my custom taxonomies are shown in the list :(

    Any help would be appreciated.

    Best regards!

  2. scribu
    Member
    Posted 4 years ago #

    You're using a plugin to define your taxonomies, right? Which one?

  3. Samuel Aguilera
    Member
    Posted 4 years ago #

    Yes, I'm using More Taxonomies, is that a problem?

  4. scribu
    Member
    Posted 4 years ago #

    Yes, it is, since More Taxonomies sets the 'public' attribute to false.

    You're better off using register_taxonomy() directly.

  5. mnaugendre
    Member
    Posted 4 years ago #

    I have the same problem. Is there a way to modify this attribute somewhere (in the DB with PHPMyAdmin?)

    I have only one custom taxonomy, but it contains many terms, and I really like the functionalities of More Taxonomies to manage them.

  6. mnaugendre
    Member
    Posted 4 years ago #

    Are you sure that is the problem?

    I just had a look at the code and saw that:

    $default = array(
    		'hierarchical' => true,
    		'public' => true,
    		'show_ui' => true,
    (...)
  7. Samuel Aguilera
    Member
    Posted 4 years ago #

    scribu: Is your plugin compatible with any other Taxonomies plugin?

    By the way... I agree with mnaugendre, public is set to true in the More Taxonomies plugin.

  8. Ovidiu
    Member
    Posted 4 years ago #

    similar problem here:

    this plugin shows custom taxonomies created with the "Simple Taxonomies" plugin http://wordpress.org/extend/plugins/simple-taxonomies/
    but not those created with the "GD Custom Posts And Taxonomies Tools" plugin http://wordpress.org/extend/plugins/gd-taxonomies-tools/

    although the first plugin offers no options when creating the taxonomies while the second one lets me specify all sorts of attributes and I chose public...

  9. scribu
    Member
    Posted 4 years ago #

    Are you sure that is the problem?

    I just had a look at the code and saw that:

    $default = array(
    'hierarchical' => true,
    'public' => true,
    'show_ui' => true,
    (...)

    Yes, I'm sure:

    1. Registered a taxonomy 'test'
    2. Enabled 'Allow permalinks', 'Show UI' and 'Allow queries' (notice there's no 'Public' setting)
    3. Added this code to my functions.php file:

    function test_tax() {
    	var_dump( get_taxonomy('test')->public );
    }
    add_action('init', 'test_tax');

    And got this result:

    string(0) ""

    which is equivalent to False.

  10. scribu
    Member
    Posted 4 years ago #

    @Ovidiu: The "GD Custom Posts And Taxonomies Tools" plugin sets public to 'yes' instead of True, but that's good enough. The development version of QMT (1.3.1-alpha) accomodates this.

  11. scribu
    Member
    Posted 4 years ago #

    I have only one custom taxonomy, but it contains many terms, and I really like the functionalities of More Taxonomies to manage them.

    The term management functionalities come from WordPress, not More Taxonomies.

  12. mnaugendre
    Member
    Posted 4 years ago #

    I have only one custom taxonomy, but it contains many terms, and I really like the functionalities of More Taxonomies to manage them.

    The term management functionalities come from WordPress, not More Taxonomies.

    I'm not sure we're speaking about the same thing: as soon as I deactivate the More Taxonomies plugin, my custom taxonomy doesn't appear in the article edit screen any longer; there is no way I can assign terms to the article I'm editing, nor create new terms from this screen.

    When I reactivate the plugin, everything re-appear; thus I guess that's More Taxonomies that bring all this.

  13. Ovidiu
    Member
    Posted 4 years ago #

    @Ovidiu: The "GD Custom Posts And Taxonomies Tools" plugin sets public to 'yes' instead of True, but that's good enough. The development version of QMT (1.3.1-alpha) accommodates this.

    true, works fine.

    BUT you gave the wrong link :-)

  14. scribu
    Member
    Posted 4 years ago #

    When I reactivate the plugin, everything re-appear; thus I guess that's More Taxonomies that bring all this.

    It just registers the taxonomy, but then WordPress is the one that creates the boxes and the menus.

    All that More Taxonomies does ultimately is call register_taxonomy() with the settings you choose.

    Yes, it's more convenient to have a settings page in the admin to register taxonomies, but the plugin has to work properly. :P

  15. mnaugendre
    Member
    Posted 4 years ago #

    BUT you gave the wrong link :-)

    Can somebody provide the right link, please :-)

    All that More Taxonomies does ultimately is call register_taxonomy() with the settings you choose.

    Thanks for the clarification, I understand your point, now.

    However, I tried other plugins:
    - GD Custom Posts ... doesn't do better, custom taxonomies don't appear in the drill-down widget; may be your development version solves the problem?
    - Simple Taxonomies is not an option as it doesn't do hierarchical taxonomies, and has not been updated for more than a year
    - Custom Taxonomies doesn't work wit WP 3.0.1

    ... what's left?

  16. scribu
    Member
    Posted 4 years ago #

    How to download the development version:

    1. Go to the Extend page: http://wordpress.org/extend/plugins/query-multiple-taxonomies/

    2. Click on "Other Versions ยป"

    3. Click on "Development Version"

  17. Milan Petrovic
    Member
    Posted 4 years ago #

    @scribu, my GD Custom Post and Taxonomies Tools sets public to true not yes. Internally is stored as yes, but is set as true (or false). I will however check my plugin with Query Multiple Taxonomies plugin. I don't see any reason why taxonomies created my plugin don't work with QMT, because it works with everything else and is created the same way and in the same time as WP does with default taxonomies.

  18. Milan Petrovic
    Member
    Posted 4 years ago #

    Well, my GD Custom Post and Taxonomies Tools works fine with Query Multiple Taxonomies. I tried latest versions of both plugin on WP 3.0 and WP 3.0.1 and it's OK. Taxonomies appear in the widget and widget works fine.

    Also, I tried different taxonomies plugins and most of them don't implement taxonomies as it should be done. I make changes to my plugin to match WP always and I am sure that everything in the process of registering taxonomies or custom posts is done right in GD Custom Post and Taxonomies Tools.

    I will surely give plugin one go over to check if everything is in order and release fixed version soon (if needed).

  19. scribu
    Member
    Posted 4 years ago #

    Hello Milan Petrovic, good to see I'm not the only one trying to make plugins compatible with one another.

  20. Milan Petrovic
    Member
    Posted 4 years ago #

    Some plugins that deal with basic features should be easy to pair up, but in case of custom post and taxonomies I think that WP core needs a more streamlined way of registering them.

    Right now WP uses normal init action. It's much better to have a separate action for that, and we can hook into it and add more taxonomies or post types. Right now in some cases plugins can even miss that there is a custom post type or taxonomies.

  21. mnaugendre
    Member
    Posted 4 years ago #

    Great!

    Thanks a lot to both of you, scribu and Milan Petrovic: that works with last versions of both plugins.

    Now, I need to put the drill-down query on a page, but that is been spoken of in an other topic.

    ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic