• Resolved amitrozen

    (@amitrozen)


    Hey.
    My name is amit and i need help to order the categories in my site.
    i’m useing arthemia premium theme and want to order the categories in the middle.

    this is the dome site: https://demo.colorlabsproject.com/arthemia/

    the categories order by ABC and i want to order them by ID.

    this is the code for the middle:

    <div id="middle" class="clearfloat">
    
    	<?php $postcat = get_settings( "ar_categories" );
    		if( $ar_categories == 0 ) { $ar_categories= $cp_categories->cat_ID; }
    
    	if( ! is_array( $postcat ) ) {
    		foreach ( $cp_categories as $b ) {
    		$postcat[] = $b->cat_ID;
    		}
    	}
    
    	$postcat = array_slice($postcat, 0, 5);
    
    	foreach ($postcat as $cp_pC ) { ?>
    
    	<?php query_posts("showposts=1&cat=$cp_pC&orderby=ID");?>
    	<div id="cat-<?php echo $cp_pC; ?>" class="category" onclick="window.location.href='<?php echo get_category_link($cp_pC);?>';">
    		<span class="cat_title"><?php single_cat_title(); ?></span>
    		<p><?php echo category_description($cp_pC); ?></p>
    	</div>
    	<?php } ?>
    
    	<?php wp_reset_query(); ?>
        </div>

    please help me.
    it’s very importent for me.

    tnx.

Viewing 15 replies - 1 through 15 (of 20 total)
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘help with the categories order’ is closed to new replies.