Forums

[resolved] How to: change navigation order of categories? (4 posts)

  1. marksurf
    Member
    Posted 2 years ago #

    Hello,

    Could someone with development skills help me out? Thanks

    My website navigation displays categories. I would like to change the order, instead of alpabetical i woel like to display in by categorie number.

    Can the be changed in the code? below a snapshot of my header.php

    <!-- Category Nav Starts -->
    			<div id="cat_navi" class="wrap">
    				<ul id="secnav">
    
    					<?php if (get_option('woo_home_link') == "true") : ?>
    					<li><a href="<?php bloginfo('url'); ?>"><?php echo get_option('woo_home_link_text'); ?><br /><span><?php echo get_option('woo_home_link_desc'); ?></span></a></li>
    					<?php endif; ?>
    
    					<?php foreach ( (get_categories('exclude='.get_option('woo_cat_ex') ) ) as $category ) { if ( $category->category_parent == '0' ) { ?>
    
                        <li>
                            <a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->cat_name; ?><br /> <span><?php echo $category->category_description; ?></span></a>
    
                            <?php if (get_category_children($category->cat_ID) ) { ?>
                            <ul><?php wp_list_categories('title_li&child_of=' . $category->cat_ID ); ?></ul>
                            <?php } ?>
                        </li>
    
    					<?php } } ?>
    
    				</ul>
    			</div>
    			<!-- Category Nav Ends -->

    My site is http://www.iski.nl a skikleding site

  2. Shane G.
    Member
    Posted 2 years ago #

  3. Mark / t31os
    Moderator
    Posted 2 years ago #

    You don't need a plugin for everything, the function covers this.
    http://codex.wordpress.org/Template_Tags/wp_list_categories

    See the order, and orderby parameters on the above link..

  4. marksurf
    Member
    Posted 2 years ago #

    thanks for the help! I got it

Topic Closed

This topic has been closed to new replies.

About this Topic