Forum Replies Created

Viewing 1 replies (of 1 total)
  • I too fixed this bug, I ‘think’ this is slightly more efficient as it doesn’t have a nested loop. Don’t mean to hijack your thread but found it when I was looking to post my fix.

    if( !empty( $exclude_tree ) )
        {
    	$exclude_trees = array();
            $exclude_trees = explode(',', $exclude_tree );
    
            $excludes = array();
            foreach( $exclude_trees as $parent_exclude )
            {
                $excludes[] = $parent_exclude;
                $children = get_page_children( $parent_exclude, $pages );
                foreach ( $children as $child )
                    $excludes[] = $child->ID;
            }
    
    	$total = count( $pages );
    	for ( $i = 0; $i < $total; $i++ ) {
    	    if ( in_array( $pages[$i]->ID, $excludes) ) {
    		unset( $pages[$i] );
                }
    	}
        }

    PhrankDee, you should be able to do what you want with css.

Viewing 1 replies (of 1 total)