Mike, I’ve taken a look at the code and your ideal end use case … and some of them, frankly, aren’t possible with the current system. Again, your requirements:
- Get the “Microsite” submenu page to be highlighted when editing an Attorney
- Get the Attorney Menu Page link to link to
/wp-admin/edit.php?post_type=attorney
when editing an Attorney - Get the “Microsite” link not to trigger a “You do not have sufficient permissions to access this page” error
And the key issue here is #2.
What I tried
I tried adding a custom post type for Attorneys and was immediately reminded that /wp-admin/edit.php?post_type=attorney
will give you a list of attorneys, not an actual edit screen. The actual editing take place on /wp-admin/post.php?post=10&action=edit
. So if you’re really tied to #2 … the other two criteria won’t work.
This is why #3 fails in implementation … and I wasn’t even able to attempt #1 because I couldn’t get that far.