jarvis Posted July 8, 2010 Share Posted July 8, 2010 Hi All, Building a site with wordpress and want to show which page your on with the nav, as such the following code works: <?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>'; } } ?> Problem is, it's stopped the page order plug in I use working and just lists the pages automatically in alphabetical order. Is there any way I can alter the above to stop this? Thanks Link to comment https://forums.phpfreaks.com/topic/207108-wordpress-page-order-issue/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.