Is it possible to use add_submenu_page() to add an item that’s a link to edit another page?


I’ve recently discovered add_submenu_page and was pleased to be able to add my own page under a specific post type. I’m using a callback function to output some HTML directly

 * Display callback for the submenu page.
function homeslides_ref_page_callback() { 
?><h1>Curate Social Media</h1> 
<iframe style="width:100%; height:100%;min-height:600px" src="/mypage">    </iframe>

I would now like to make a separate callback for other custom post types, but one that lets me effectively make a shortcut to edit a particular page. For example, I have a custom post type called Careers, and within Careers I’d like to add a menu item that links to the edit page for a separate page.

It’s not immediately obvious to me how I’d do this – does anyone have experience of this?

Jonny Perl 4 months 0 Answers 16 views 0

Leave an answer