Home › Forums › Back End › [Solved] WordPress header and new pages › Re: [Solved] WordPress header and new pages
April 2, 2010 at 1:03 am
#73343
noahgelman
Participant
Found the appropriate code. I’m using starkers theme and since it’s torn down to the basics, it didnt have it. Here is the code.
Code:
get_results(‘select ID, post_title from ‘. $wpdb->posts .’ where post_status = “publish” and post_type = “page” order by ID’);
ID).'” title=”‘.$thats_all->post_title.'”>‘.$thats_all->post_title.’‘;
}
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 .= ‘
}
return $output;
}
?>
Home“;
echo list_all_pages();?>