use Order in Template (orderby or order)
-
Hi,
i use your plugin to order my CPT. now i want to use this order in a template:
A little snippet from my code:if ($catc = $term->count) { $termz = get_terms([ 'taxonomy' => get_queried_object()->taxonomy, 'parent' => $catid, 'order' => 'DESC', //<----------- which Expression should i use 'orderby' => 'title', //<----------- which Expression should i use ]); echo '<ul class="catul catunder">'; foreach($termz as $cy) { echo '<li><a href="' . get_category_link( $cy->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $cy->name ) . '" ' . '>' . $cy->name.'</a> </li> '; } } echo '</ul>'; }
se comments in code. i want to use the custom order.
thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘use Order in Template (orderby or order)’ is closed to new replies.