I am creating a custom theme for wordpress, which will have a settings page. i am adding the option to exclude pages from the navigation, which will simply work on the page id separated by a ","
here is the code i have so far:
<ul class="tabs"> <?php $exmenuitems = get_option('exmenuitems'); $recentPosts = new WP_Query(); $recentPosts->query (array ( 'post__not_in' => array($exmenuitems), 'post_type' => 'page', 'showposts' => $menuitems )); while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <?php $slug = basename(get_permalink());?> <li><a href="#<?php echo $slug; ?>"><?php the_title();?></a></li> <?php endwhile; ?> </ul>
this works fine excluding just 1 page id. but when i try and exclude more than 1 id it doesn't work, only the first id in the text input will get excluded and the other remain visible.
any help would be greatly appreciated.