I want to exclude a page from showing up in my navigation links in the header. I’ve seen examples using wp_list_pages, but my header.php doesn’t use that. here’s what i have:
<?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;
$these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" and ID <> 123 order by ID');