Create a group via WP_Admin
-
I have a requirement to only allow group creation from the wp-admin.
the wp-admin/groups/index page ‘Add New’ button takes us to the front end /groups/create page.
I don’t want to amend core files does anybody have any pointers as to how I can achieve this?
I have tried to redirect (for the moment to the edit page as a test) but this is failing and always takes me to the front-end create page:
add_action('init', 'rewrite_admin_group_create'); function rewrite_admin_group_create() { global $wp_rewrite; $wp_rewrite->add_rule('groups/create/', 'wp-admin/admin.php?page=bp-groups&action=edit&gid=2','top'); $wp_rewrite->flush_rules(false); }
I’m using WP: 3.8.1 and BP: 1.9.1
tia
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Create a group via WP_Admin’ is closed to new replies.