WordPress.org

Ready to get started?Download WordPress

Forums

Media Categories
[resolved] custom taxonomy is not saved (10 posts)

  1. dadastudio
    Member
    Posted 1 year ago #

    Hello

    I have such problem:

    1. I select a custom taxonomies and click Update Media
    2. I go back to Edit Media screen
    3. Checkboxes are not selected.

    of course I added a filter in functions.php

    While Categories behaves correctly - they are saved each time. Only custom taxonomies aren't.

    I don't know if settings aren't saved into database or they just aren't correctly displayed..

    ( BTW I have created custom taxonomy with this plugin http://wordpress.org/extend/plugins/types/ )

    http://wordpress.org/extend/plugins/media-categories-2/

  2. Eddie Moya
    Member
    Plugin Author

    Posted 1 year ago #

    If I understand you correctly, you are trying to use the filter mc_taxonomy filter?

    Thats the old way, I would suggest trying the object oriented way

    $my_custom_media_metabox = new Media_Categories('my_custom_taxonomy');

    This should solve any problems you having. If you continue to have problems let me know and I'll look into it. I'm not familiar with that custom types plugin, so its possible they may not be compatible. Before we reach that conclusion though, try line i pasted above.

  3. dadastudio
    Member
    Posted 1 year ago #

    ahh ok . now it works. thank you.

    But... do I have to use it with shortcode? I just need a list of images src. How to achieve this?

  4. Eddie Moya
    Member
    Plugin Author

    Posted 1 year ago #

    You do not have to use shortcodes no - the shortcodes are just the only built in feature I've added for end-users to be able to use this plugin without any development.

    As a developer its entirely possible to use these images in any way you please.

    In WordPress images are a post_type called 'attachment', and normally any post type can have a taxonomy applied to them. Posts can by default, and Pages can with a small line of code in functions.php, custom post types can too. Attachments by default can not - all this plugin does is enable that functionality, and provide a decent familiar interface.

    You can query for post_type 'attachment' in category 'whatever' the same way you query for other post types within a taxonomy.

    This plugin was originally developed for the Kmart Fashion Lookbooks - and that site does not use shortcodes anywhere.

  5. dadastudio
    Member
    Posted 1 year ago #

    Ok got it. It works :) Thank You very much.

  6. KVachon
    Member
    Posted 1 year ago #

    Hello, I am running into the same issue on my installation. I am trying to add multiple custom taxonomies, and I am seeing the same issue that Dadastudio describes

    1. I select a custom taxonomies and click Update Media
    2. I go back to Edit Media screen
    3. Checkboxes are not selected.

    In my functions.php file I am using the new object oriented method like so:

    $wood_species_metabox = new Media_Categories('wood_species');
    $wood_installation_metabox = new Media_Categories('wood_installation');

    Any ideas?

  7. dadastudio
    Member
    Posted 1 year ago #

    Eddie,

    another issue. .. I use WPML plugin to translate my custom taxonomies and while I switch language, select some options and save, settings from previous language are lost.

    I know that Your plugin is not compatibile with WPML but It would be great if You could take a look at this and show me a direction how to fix it..

    Regards

  8. Eddie Moya
    Member
    Plugin Author

    Posted 1 year ago #

    @KVachon:
    * What version of WordPress are you running?
    * What version of Media Categories are you using?

    As an off chance aside - do you know if your plugins folder uses symlinks anywhere in the directory path?

    @dadstudio - I am not familiar with the WPML plugin. I've not spent much time doing much for localizations - but I set things up in such a way that this plugin should be able to take the labels directly from the taxonomy you chose. So if you chose 'category' it wull pluralize and such based on terms defined for that taxonomy.

    Perhaps your asking for something else though, something im not understanding because I'm unfamiliar with WPML.

  9. boxcarpress
    Member
    Posted 1 year ago #

    Thanks for the plugin!! I ran into this same problem with not being able to save custom taxonomy terms with the old mc_filter_taxonomy method. I might suggest you update the Readme file to indicate that the old method doesn't work with custom taxonomies. Right now, the Readme implies that it does work because of the comment, "* If using a Custom Taxonomy with this plugin, be sure to assign values to the labels for proper pluralization and context" right under the code for mc_filter_taxonomy.

    Ok, so if the object oriented way is the right way to handle this, there doesn't appear to be a clean way to handle removing the default Categories checkboxes. For now I've commented out the last line of media-categories.php, but it would be nice not to have to muck with your code. You might consider adding the taxonomies to use to a Setting in the admin area. Barring that, it would be nice if you hooked the $mc_category_metabox variable to an action we could deregister.

  10. Eddie Moya
    Member
    Plugin Author

    Posted 1 year ago #

    I'll be looking into the unresolved reporte bugs this week. I apologize for not looking into them sooner. I have been swamped at work for the last several months.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic