Please Help Me Find Page Sorting Code
-
Buddies, Please help me find the code in my theme which determines page sorting..
Theme name: Alexified
<div id="menu"> <ul> <li><a <?php if (is_home()) echo "class=\"active\""; ?> href="<?php bloginfo('url'); ?>"><span>Home</span></a></li> <?php $pages = get_pages(); if ($pages) { foreach ($pages as $page) { $page_id = $page->ID; $page_title = $page->post_title; $page_name = $page->post_name; if ($page_name == "archives") { (is_page($page_id) || is_archive() || is_search() || is_single())?$selected = ' class="active"':$selected=''; echo "<li><a".$selected." href=\"".get_page_link($page_id)."\"><span>Archives</span></a></li>\n"; } elseif($page_name == "about") { (is_page($page_id))?$selected = ' class="active"':$selected=''; echo "<li><a".$selected." href=\"".get_page_link($page_id)."\"><span>About</span></a></li>\n"; } elseif ($page_name == "contact") { (is_page($page_id))?$selected = ' class="active"':$selected=''; echo "<li><a".$selected." href=\"".get_page_link($page_id)."\"><span>Contact</span></a></li>\n"; } elseif ($page_name == "about_short") {/*ignore*/} else { (is_page($page_id))?$selected = ' class="active"':$selected=''; echo "<li><a".$selected." href=\"".get_page_link($page_id)."\"><span>$page_title</span></a></li>\n"; } } } ?> </ul> </div>
right now its sorting the pages by name, i want to reorder them via page order or page id
Please Help me !
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Please Help Me Find Page Sorting Code’ is closed to new replies.