"", "pages" => array(), "pages2" => array(), ); foreach ($GLOBALS["pageBlocks"] as $b){ if(in_array($post->ID, $b["pages"])){ $block = $b; break; } } ?>