i am using wordpress 2.3.1 for my nilgiris travel information site. i want to add more pages ( not posts).But it can overload (or mesh up) the space in header. How can i add more pages without putting it in header area? The plugins like Page Link Manager can only manage the page links in sidebar navigation. Theme header code is given below. How can edit it to achieve above? ====== <div id="nav"> <?php function get_the_pa_ges() { global $wpdb; if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) { $these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by ID'); } return $these_pages; } function list_all_pages(){ $all_pages = get_the_pa_ges (); foreach ($all_pages as $thats_all){ $the_page_id = $thats_all->ID; if (is_page($the_page_id)) { $addclass = ' class="current_page"'; } else { $addclass = ''; } $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>'; } return $output; } ?> <ul> <?php if (is_home()) { $addclass = ' class="current_page"'; } else { $addclass = ''; } echo "<li" . $addclass . "><a href='" . get_option('home') . "' title='Home'><span>Home</span></a></li>"; echo list_all_pages();?> </ul> <div class="cleared"></div> </div> <!-- Closes Nav --> =====
Best option for you would be to remove automatic page link inserts and manually add the links. I guess this is what you to edit and replace with static links: <?php function get_the_pa_ges() { global $wpdb; if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) { $these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by ID'); } return $these_pages; } function list_all_pages(){ $all_pages = get_the_pa_ges (); foreach ($all_pages as $thats_all){ $the_page_id = $thats_all->ID; if (is_page($the_page_id)) { $addclass = ' class="current_page"'; } else { $addclass = ''; } $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>'; } return $output; } ?> <ul>