Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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)
) );

EDIT

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

 
discard

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.