Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'post_type' => 'oferta',
- 'orderby' => 'menu_order',
- 'order' => 'ASC',
- 'posts_per_page' => -1
- );
- $loop = new WP_Query($args);
- while ( $loop->have_posts() ) : $loop->the_post();
- echo "<pre>";
- var_dump(get_the_category($post->ID));
- echo "</pre>";
- ?>
- <?php endwhile; ?>
- <?php
- $taxonomia = "sua taxonomia";
- $terms = get_terms($taxonomy, array(
- "orderby" => "count",
- "hide_empty" => false,
- ));
- foreach($terms as $term) {
- // faรงa alguma coisa
- }
Add Comment
Please, Sign In to add comment