Can't find MB Builder Taxonomy saved

Support MB Builder Can't find MB Builder Taxonomy saved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4604
    PipoPipo
    Participant

    Hello,

    I'm using the MB Builder and I can't find where the value of the taxonomy's select is saved (in posts ?) and how to use it. Could you help me?

    Thanks!

    #4605
    PipoPipo
    Participant

    Just to specify a little bit, I'd like to be able to use the value in a get_posts (meta_query). I've searched for the value in phpMyAdmin but couldn't find it.

    #4607
    Tan NguyenTan Nguyen
    Participant

    Dear Pipo,

    The value is saved in the post via the field id normally, you can get the value by using rwmb_meta($field_id) function.

    #4616
    PipoPipo
    Participant

    Thanks for your answer!

    I'm trying to understand but I dont get it: why is the taxonomy select value not stored in postmeta with a combination of meta_key and meta_value (as is the post select value)? rwmb_meta('field_id') is not

    Here is my problem, let's say I want to get all the custom post type with a post select value of 5 and a taxonomy select value of 6. Now, what I would normally do is this:

    $args = array(
      'numberposts' => -1,
      'post_type' => 'myposttype',
      'meta_query' => array(
        'relation' => 'AND',
        array(
          'key' => 'is_posttype_id', // my post select value ID
          'value' => 5
        ), // this first part above works fine
        array(
          'key' => 'is_taxonomy_id', // my taxonomy select value ID
          'value' => 6
        )
      )
    );
    $results = get_posts( $args );

    However, as the taxonomy select value is not stored as a post meta I can't do that. So could you show me the best way to integrate the taxonomy select value in my get_posts arguments?

    #4617
    PipoPipo
    Participant

    Alright, I get it after I've read this: https://metabox.io/docs/how-post-meta-is-saved-in-the-database/.

    So the issue is just that it seems the taxonomy_advanced input is not working when added with the MB Builder plugin (it saves the value as the post's term and not in the database as specified).

    #4629
    Tan NguyenTan Nguyen
    Participant

    Cool, my fault also 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Can't find MB Builder Taxonomy saved’ is closed to new replies.