Giter Club home page Giter Club logo

Comments (9)

jcchavezs avatar jcchavezs commented on July 23, 2024

Hi @estin1985, can you give me more details about the environment?

  • Wordpress version
  • CMB2 version
  • CMB2-taxonomy version

from cmb2-taxonomy.

estin1985 avatar estin1985 commented on July 23, 2024

Sure! I am using the latest CMB2 (2.0.8), wordpress latest and CMB2-Taxonomy latest. It can easily be tested, just use the example functions but change the object_types array to have category. Category is a taxonomy type, but this plugin does not render in for the default categories. If it did, this would be an excellent replacement for Taxonomy MetaData

from cmb2-taxonomy.

danieljulia avatar danieljulia commented on July 23, 2024

I'm getting always empty values with a custom taxonomy..
last version of cmb2 and cmb2-taxonomy
f.i.
$autor is the custom taxonomy term
get_post_meta( $autor->term_id, '_myprefix_foto' );
returns an empty array (the id and name is correct)

from cmb2-taxonomy.

marsshall avatar marsshall commented on July 23, 2024

@danieljulia me too, with same approach... :(

$tax = 'prod_category';
$tax_terms = get_terms($tax);

foreach ($tax_terms as $key => $tax_term) {

     $prefix = '_prod_category_';
     $tax_icon = get_post_meta($tax_term->term_id, $prefix.'icon', true);

}

from cmb2-taxonomy.

marsshall avatar marsshall commented on July 23, 2024

@danieljulia We r using get_post_meta, but for term is necessary to use get_term_meta. There are no instruction to do this, but exploring plugin functions.php I found it.

Hope this help you :)

from cmb2-taxonomy.

danieljulia avatar danieljulia commented on July 23, 2024

You are right!!
Thanks!

in my sample would be
get_term_meta( $autor->term_id, '_myprefix_foto' );
instead of
get_post_meta( $autor->term_id, '_myprefix_foto' );

from cmb2-taxonomy.

jcchavezs avatar jcchavezs commented on July 23, 2024

Thank you @marsshall for the assitance. I am extremely busy this days so I could not follow up this issue. I will add the documentation for this soon.

from cmb2-taxonomy.

marsshall avatar marsshall commented on July 23, 2024

@jcchavezs @danieljulia You're welcome :)

from cmb2-taxonomy.

jcchavezs avatar jcchavezs commented on July 23, 2024

By the way, I just added some documentation for the usage: https://github.com/jcchavezs/cmb2-taxonomy#usage.
cc/ @danieljulia @marsshall

from cmb2-taxonomy.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.