So I'm having an issue excluding some pages from my nav bar. Unfortunately my theme has <?php dp_list_pages();?> instead of the normal <?php wp_list_pages();?> .
I've been told that dp_list_pages doesn't allow any exclusions as the wp_list_pages normally would.
What would I need to do in order to exclude a few pages from my nav? Here's the function code for the dp_list_pages.
# Displays a list of pages
function dp_list_pages() {
global $wpdb;
$querystr = "SELECT $wpdb->posts.ID, $wpdb->posts.post_title FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'page' ORDER BY $wpdb->posts.post_title ASC";
$pageposts = $wpdb->get_results($querystr, OBJECT);
if ($pageposts) {
foreach ($pageposts as $post) {
?><li><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a></li><?php
}
}
}
Thanks for any help. This is getting to be frustrating little problem.