WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Don't want to order Category alphabetically

[Resolved] Don't want to order Category alphabetically

  • I have a template that sets the categories in alphabetical order. I would like to change this to an different order, but unfortunately do not know how. Can anyone help me? This is the code.

    <?php foreach(get_categories('parent=0&taxonomy=dealers') as $category) { ?>
    	<div class="row">
    		<h2 class="divider"><?php echo $category->name; ?></h2>
    		<?php
    			$args = array('orderby' => 'slug', 'order' => 'ASC', 'tax_query' => array(array('taxonomy' => 'dealers', 'field' => 'id', 'terms' =>  $category->cat_ID)));
    			$loop = new WP_Query($args);
    		?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Don't want to order Category alphabetically’ is closed to new replies.
Skip to toolbar