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/