更新时间:2023-12-05 23:51:28
函数custom_menu() { add_menu_page(__('HELLO HERE','custom_menu'),__('HELLO HERE','custom_menu'),'activate_plugins','HELLO HERE','custom_menu_example'); }
function custom_menu() { add_menu_page(__('HELLO HERE', 'custom_menu'), __('HELLO HERE', 'custom_menu'), 'activate_plugins', 'HELLO HERE', 'custom_menu_example'); }
add_action('admin_menu','custom_menu');
add_action('admin_menu', 'custom_menu');
在主题下创建新文件夹(例如"morning").在该文件夹内创建新文件,例如XYZ.php.将上面的代码粘贴到该文件中.
create new folder (say 'morning') under your theme.inside that folder create new file for example XYZ.php. paste above code in that file.
现在要包含该文件,请转到您主题的functions.php,并在代码下方的文件开头定义
Now to include that file, go to functions.php of your theme and define at begining of file below code
require_once('mornign/XYZ.php');
require_once( 'mornign/XYZ.php' );
我希望它将对您有帮助