• Resolved jarvo1980

    (@jarvo1980)


    Hi All,

    I’m using the following code to highlight which page you’re on:

    <?php
    	foreach(get_pages('childof=0') as $p) {
    	  if($p->post_parent == 0) {
    	    $lc = ($p->ID == $wp_query->post->ID) ? ' class="active"' : '';
    		echo '<li><a href="'.get_permalink($p->ID).'" title="'.$p->post_title.'"'.$lc.'>'.$p->post_title.'</a></li>';
    	  }
    	}
    	?>

    It works well, however, it has stopped me using any plug in to sort the page order and simply shows the page names in alphabetical order. Is there anyway I can alter this?

    many thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Cant sort page order’ is closed to new replies.