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 Quote Link to comment https://forums.phpfreaks.com/topic/207108-wordpress-page-order-issue/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.