tags:

views:

58

answers:

1

Hi guys,

Under Pages menu in Wordpress Admin page, I got this layout:

Pages

  • Edit (url: edit-pages.php)
  • Add New (url: page-new.php)
  • Special Pages (url: edit-pages.php?special-pages=true)

as you can see, I've added a new submenu item called Special Pages which is pretty much a link to to Edit page with custom filter. Because Wordpress use file name to identify and highlight the submenu item, so whenever I click on Special Pages, the Edit submenu item is selected. Is there anyway to force Wordpress to select Special Pages menu item instead?

Cheers

A: 

Solution: use $submenu_file variable

$submenu_file = "edit-pages.php?special-pages=true"

Ken Vu