Error taxonomy frontend after update

Support General Error taxonomy frontend after update

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7120
    MikelMikel
    Participant

    Hello, after update wordpress to 4.8.2 versión, taxonomys no display in frontend.

    $terms = rwmb_meta( 'informe_territorio', 'type=taxonomy&taxonomy=territorio' );
    if (is_array($terms) || is_object($terms)){
    foreach ( $terms as $term ){
    $territorio= $term->name;
    }
    }

    Thanks

    #7121
    MikelMikel
    Participant

    advance taxonomy

    // TAXONOMY
    array(
    'name' => 'Territorio Histórico',
    'id' => "informe_territorio",
    'type' => 'taxonomy',
    'tooltip' => array(
    'icon' => 'help',
    'content' => __( 'Lo más importante es seleccionar lo primero el territorio historico de la cavidad, para que se genere la sigla interna correctamente', 'meta-box' ),
    'position' => 'right',
    ),
    'required' => true,
    'options' => array(
    // Taxonomy name
    'taxonomy' => 'territorio',
    // How to show taxonomy: 'checkbox_list' (default) or 'checkbox_tree', 'select_tree' or 'select'. Optional
    'type' => 'select_advanced',
    // Additional arguments for get_terms() function. Optional
    'args' => array('taxonomy' => 'territorio')
    ),

    ),

    #7130
    MikelMikel
    Participant

    Any idea? two day to resolve this problem

    $terms = rwmb_meta( 'informe_tipo_cavidad', array('type'=>'taxonomy', 'taxonomy'=>'tipo'));
    if ( !empty( $terms ) ) {
    foreach ( $terms as $term ){
    $tipoCavidad=$term->name;

    }
    }

    #7131
    MikelMikel
    Participant

    $terms = get_terms( 'informe_tipo_cavidad');
    if ( !empty( $terms ) ) {
    foreach ( $terms as $term ){
    $tipoCavidad=$term->name;

    }
    }

    #7135
    Truong GiangTruong Giang
    Participant

    Hi there,

    Can you give me the full code you use to register meta box? And where do you put the meta box shortcode?

    Thank you.

    #7137
    MikelMikel
    Participant

    The solution

    $terms=get_the_terms( $post->ID , 'tipo' );;
    if ($terms) {
    foreach ($terms as $term ) {
    $tipoCavidad=$term->name;
    }
    }
    Thanks

    #7141
    Truong GiangTruong Giang
    Participant

    Hi,

    Taxonomy field does NOT save term IDs in post meta, instead of that, it only set post terms. Please read https://metabox.io/docs/define-fields/#section-taxonomy

    Thank you.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Error taxonomy frontend after update’ is closed to new replies.