admin管理员组文章数量:1422062
I am creating a social website similar to facebook/twitter where when someone logins it gives them option "create a page" which will show various input fields to the users to add their page details and then create a new page (mysite/page_username), similar to facebook. Currently, we can only create groups in buddypress. Any resource and suggestion would be helpful :)
I am creating a social website similar to facebook/twitter where when someone logins it gives them option "create a page" which will show various input fields to the users to add their page details and then create a new page (mysite/page_username), similar to facebook. Currently, we can only create groups in buddypress. Any resource and suggestion would be helpful :)
Share Improve this question asked Jul 31, 2017 at 9:39 Raunak HajelaRaunak Hajela 1133 silver badges12 bronze badges1 Answer
Reset to default 0The code below is an example in how to add an admin page to your WordPress website - you can use the example below as starting point, minimal changes are required.
add_action('admin_menu', 'awesome_page_create');
function awesome_page_create() {
$page_title = 'My Awesome Admin Page';
$menu_title = 'Awesome Admin Page';
$capability = 'edit_posts';
$menu_slug = 'awesome_page';
$function = 'my_awesome_page_display';
$icon_url = '';
$position = 24;
add_menu_page( $page_title, $menu_title, $capability, $menu_slug,
$function, $icon_url, $position );
}
You can find more information in how to add page admin on the links below.
https://codex.wordpress/Creating_Options_Pages
https://www.nuno-sarmento/custom-admin-page-wordpress/
本文标签: How to add quotcreate pagequot option for users in buddypress like facebook
版权声明:本文标题:How to add "create page" option for users in buddypress like facebook? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745358207a2655174.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论