WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Its that possible?Than when something is added to page in admin panel, page link to that page appears.

share|improve this question
up vote 1 down vote accepted

I think you would need to implode(',',$excluded_pages) for things to work,

$excluded_pages = array();
$all_pages = get_pages();
foreach ( $all_pages as $the_page ) {
    if ( '' == $the_page->post_content ) {
        $excluded_pages[] = $the_page->ID;
wp_list_pages( array(
    'exclude' => implode(',',$excluded_pages)
) );


share|improve this answer
clever,tnx.But I igot complicated menu structure.Any idea how to implement this on my code? take a look: <li><a><?php _e('Локална самоуправа'); ?></a> <ul><?php wp_list_pages('title_li=&sort_column=menu_order&include=265,267,269'); ?> <li><a><?php _e('Скупштина Општине'); ?></a> <ul><?php wp_list_pages('title_li=&sort_column=menu_order&include=536,551,556,558,564,566,‌​568'); ?></ul> </li> and so on ... – user4490 Jul 14 '11 at 15:07
See edited answer. – Chip Bennett Jul 14 '11 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.