douyong4623
douyong4623
2016-01-01 06:49
浏览 35
已采纳

我想添加一个新的wordpress页面

Happy new year to everyone. I added a new link in my wordpress. The url is wp-admin/users.php?page=business&user_id=2 but when I access the page is says You do not have sufficient permissions to access this page. I know that the page is not created yet business How will I create new page so that I can work on page=business?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanbenzan4050
    duanbenzan4050 2016-01-01 07:36
    已采纳

    It is really that easy please add the following code. Let me know if you require more help.

    add_action('admin_menu', 'adminMenus');
    
    function adminMenus(){
        add_submenu_page( 'users.php', 'Business Page Title', 'My Business Menu', 'manage_options', 'business', 'businessPageFunction');
    }
    
    function businessPageFunction(){
        echo "Meow...";
    }
    

    For more information View Function Reference/add submenu page and Plugin API/Action Reference/admin menu

    点赞 评论

相关推荐