最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to add "create page" option for users in buddypress like facebook?

programmeradmin1浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

The 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/

发布评论

评论列表(0)

  1. 暂无评论