Sliding Doors In WordPress

A default WordPress page menu is built like this:

'0', 'sort_column'=>'menu_order'));

— which outputs a plain menu, <li><a href=" ... ">Menu Item</a></li> and so on.

If you want to use the sliding doors CSS technique, however, you need more markup. So do this:

]*)>]*)>(.*?)@i', '$3', wp_page_menu(array('echo'=>false,'depth'=>'0', 'sort_column'=>'menu_order')) );

— which’ll output this a more CSS friendly markup: <li><a href=" ... "><span>Menu Item</span></a></li>.