Okay
  Public Ticket #3165482
getPostTerms new taxonomy
Closed

Comments

  • aldi123 started the conversation

    I added below code in wordpress to add new taxonomy in post. But I don't know how to show new taxonomy on post grid widget. I founded {{putPostTags(item.post_list.id)}} but I don't know how to change to use it.

    function custom_taxonomy() {
        /* $label contains parameters determining the Taxonomy’s display name
        */
        $labels = array(
            'name' => 'Expert',
            'singular' => 'Expert',
            'menu_name' => 'Expert'
        );
        /* $args declares various parameters in the custom taxonomy
        */
        $args = array(
            'labels' => $labels,
            'hierarchical' => false,
            'public' => true,
            'show_ui' => true,
            'show_admin_column' => true,
            'show_in_nav_menus' => true,
            'show_tagcloud' => true,
    'rewrite'  => array( 'slug' => 'expert' ),
        );
        /* register_taxonomy() to register taxonomy
        */
        register_taxonomy('expert', 'post', $args);
    }
    // Hook into the 'init' action
    add_action( 'init', 'custom_taxonomy', 0 );


  •   Max replied privately
  • aldi123 replied

    I used {{putPostTags(item.post_list.id)}} but this function show only default tags but how show my new taxonomy whitch has name Expert?

  •   Max replied privately
  • aldi123 replied

    Thanks for help, Your suggested give me solution which works.