WordPress.org

Forums

[Plugin: Category Meta plugin] Does Category Meta extend to other taxonomies? (9 posts)

  1. r-a-y
    Member
    Posted 5 years ago #

    From reading the description, I see that a "wp-termsmeta" table is created.

    I haven't tested the plugin yet, but is it fair to assume that Category Meta supports adding metadata to other taxonomies like tags or custom taxonomies?

    http://wordpress.org/extend/plugins/wp-category-meta/

  2. elebail
    Member
    Posted 5 years ago #

    Hello,

    Yes the function defined in the plugin can be used with any taxonomy.

    <?php
    if (function_exists('get_terms_meta'))
    {
        $metaValue = get_terms_meta($category_id, $meta_key);
    }
    ?>
    
    <?php
    if (function_exists('get_all_terms_meta'))
    {
        $metaList = get_all_terms_meta($category_id);
    }
    ?>

    But the plugin administration part allow to defined meta for categories only.
    The plugin administration also adds fields into the category edition page.

    So in order to use this plugins with other taxonomies, you have to create your own administration pages for your taxonomy.

    Regards,
    Eric Le Bail

  3. spotcream
    Member
    Posted 5 years ago #

    eric any news on an updated version of your much loved category meta plugin.

  4. elebail
    Member
    Posted 4 years ago #

    Hello,

    Plugin version 1.2.0 is now creating meta for all taxonomies:
    - Category
    - Tag
    - and all custom taxonomies.

    Regards,
    Eric Le Bail

  5. anabelle
    Member
    Posted 4 years ago #

    Why could it be, Input fields for the ones I created are not showing up on the edit screen.

    Any Idea?

  6. elebail
    Member
    Posted 4 years ago #

    Hello,

    In order to display the configured fields, the plugins use the folowing Hooks:

    <taxonomyName>_edit_form
    <taxonomyName>_add_form_fields

    Does your taxonomy edit page call those hooks ?

    The standard category / tag edit page does, if you have a custom edit page you need to call those hooks.

    Regards,
    Eric

  7. anabelle
    Member
    Posted 4 years ago #

    Thanks for your help. But i don't understand where to call those hooks.

    I added a custom type, registered a new taxonomy, and configured the plugin to add 3 new fields to my new taxonomy.

    How do I call those hooks from my custom taxonomy edit page?

    (note, I have not modified the edit taxonomy page, I just rgistered the taxonomy and trying to edit it from the default edit screent)

    Thanks!

  8. anabelle
    Member
    Posted 4 years ago #

    Please help me,

    I tested it with a normal category and it worked fine, but I just can't get it working with a custom taxonomy.

    What do you have to do so that input fields show in a custom taxonomy edit screen?

    In case it helps the url looks something like this when editing:

    /wp-admin/edit-tags.php?action=edit&taxonomy=Colombia&post_type=video&tag_ID=37

  9. anabelle
    Member
    Posted 4 years ago #

    I solved it adding the following to my functions.php

    add_action ( 'Colombia_add_form_fields', 'wptm_add_meta_textinput');
    add_action ( 'Colombia_edit_form', 'wptm_add_meta_textinput');

    Colombia is the name of my custom taxonomy, please tell me if this is ideal.

Topic Closed

This topic has been closed to new replies.

About this Topic