Answer the question
In order to leave comments, you need to log in
How to insert third party php code into admin page?
All the best.
I have a php code that renders a page with a file manager, I'm trying to make a page out of it in the admin panel
<?php
add_action( 'admin_menu', 'custom_php' );
function custom_php() {
add_menu_page(
'custom_php_display_page'
);
}
function custom_php_display_page() {
//custom_php_code
}
Answer the question
In order to leave comments, you need to log in
Probably, this code will have to be divided: insert the layout of forms and tables into the body of the created page in add_menu_page()
, connect php handlers and functions in functions.php , and connect js scripts on the hook admin_enqueue_scripts
. It's better to put it all in a separate plugin.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question