http://codex.wordpress.org/Template_Tags/wp_list_pages
This link will show you have you can have whichever pages shown you’d like… you may want to just try exclude=pageshedoesntwant.
Ok, i appreciate you pointing me int he right direction, quick question if anyone can help again. I will paste my code below, the problem is I know I put the exclude command in there wrong and the display categories even if there is nothing in them wrong. Could someone help me clean it up a little bit. Here is my code:
<li id="categories">
<h2><?php _e('Posts by Category'); ?></h2>
<form action="<?php bloginfo('url'); ?>/" method="get">
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0 exclude=9,23,16,15,3,1);
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
echo $hide_empty=0;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
</li>
Here is the original code:
<li id="categories">
<h2><?php _e('Posts by Category'); ?></h2>
<form action="<?php bloginfo('url'); ?>/" method="get">
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
</li>
Thanks guys!
Halls,
I really appreciate your help! I almost have it getting 2 problems. As soon as I added the exclude tag it made 2 drop down menus, but it is excluding the categories I don’t want which is good. Then I added the command to display categories that do not have posts in them. Final addition was the hierarchy command but that made the categories with no entry disappear. I will post my code so either you or anyone may see it.
<li id="categories">
<h2><?php _e('Posts by Category'); ?></h2>
<form action="<?php bloginfo('url'); ?>/" method="get">
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0 &exclude=9,23,16,15,3,1&hierarchical=1&hide_empty=0 ');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
</li>
Thanks again!
Update: I partially fixed the problem deleted an extra space I had in the code so now all of the categories are displaying, but I still have 2 drop down boxes.
Sorry for all the posts another update though. I got it working I had another space in the code. All is working well now! Thank you for all of your help halls!
You’re welcome, I’m glad I was able to help get it working. Please mark this post as resolved.