Untitled

mail@pastecode.io avatar
unknown
php
a year ago
521 B
1
Indexable
Never
  function get_pasta_object($pasta_id)
    {
        $pastas = new WP_Term_Query(array(
            'taxonomy'      => 'nt_wmc_folder',
            'term_taxonomy_id'         => $pasta_id,
            // 'term_ids'        => 750,
            'hide_empty'    => false,
            'meta_key'      => 'folder_position',
            'orderby'       => 'meta_value_num',
            'order'         => 'ASC'
        ));
         foreach($pastas->get_terms() as $pasta) 
         {
            return $pasta;
         } 
    }