• Hi,
    thanks for this plugin. It’s very usefull, but i dont like they way, the taxonomies are shown up. Why don’t u use the standard behavior of viewing a taxonomy-metabox, instead of listing them with loosing the structure (subcategories by using a hierarchical taxonomy)?

    I looked up your code and one line does the trick (@line 178 following):

    //Hierarchical listing (like the category of posts)
    post_categories_meta_box(get_post($num = get_the_ID()), array('taxonomy' => $field['taxonomy']));
    //or Tag-like view
    post_tags_meta_box(get_post($num = get_the_ID()), array('taxonomy' => $field['taxonomy']));

    I tested this one and it seems to work… What do you think about?

    Greetings Maik

    https://www.ads-software.com/extend/plugins/advanced-custom-fields-taxonomy-field-add-on/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Slubbix,

    I don’t have experimented your code but I am wondering if you have encountered errors, and above all, if it adds the ability to directly add terms?

    Thanks !

    Edit: just back from the topic created by ron_dev, where I find that you code add the text input ! Very good ! ??

    Thread Starter Beevelop

    (@slubbix)

    The above snippet acts like a normal WordPress-Taxonomy, but i encountered a bug. You have to have at least one Tag-Taxonomy-Metabox on the Edit-View to have the js-functionalities (expand the most used, add,…) working. Btw. if someone is interested in my final implementation:

    public function create_field( $field ) {
    	$this->set_field_defaults( $field );
    
    	$terms = get_terms($field['taxonomy'], array('hide_empty' => false));
    	$value = $field['value'];
    
            $arr = get_taxonomies(array('name' => $field['taxonomy']), 'objects');
            if($arr[$field['taxonomy']]->hierarchical) {
                post_categories_meta_box(get_post($num = get_the_ID()), array('args' => array('taxonomy' => $field['taxonomy'])));
            } else {
                post_tags_meta_box(get_post($num = get_the_ID()), array('args' => array('taxonomy' => $field['taxonomy'])));
            }
    }

    (From Line 172)

    Greetings Maik

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Advanced Custom Fields – Taxonomy Field add-on] [Improvement] Output like normal taxonomy’ is closed to new replies.