Your cart is currently empty!
adding Groups meta boxes to front end posting form from another plugin
—
by
We are using the WordPress Download Manager plugin. It has a front end upload form, for creating a post of its custom post type on the front end.
We’d like the person doing the front end post to be able to assign groups to the post from the Groups plugin. This can be done on the back end, of course, since Groups adds its meta boxes to the standard WP post editing forms. But our client needs this available on the front end.
There is a custom template for this front end form, where we can add the meta box, *if* we know how.
So far I have tried this:
require_once( GROUPS_ACCESS_LIB . ‘/class-groups-access-meta-boxes.php’ );
require_once( GROUPS_VIEWS_LIB . ‘/class-groups-uie.php’ );
require_once(ABSPATH . ‘wp-admin/includes/screen.php’);
Groups_Access_Meta_Boxes::add_meta_boxes(‘wpdmpro’, $post);
Groups_UIE::render_select();
It doesn’t error, but it also doesn’t render a Groups meta box for assigning groups to the post.
As you can see, i’m kind of groping in the dark here … what can we do to add the capability of assigning groups to this post of custom post type on the front end?
Comments
One response to “adding Groups meta boxes to front end posting form from another plugin”
Hi Steven,
First of all, this sounds pretty interesting as it would extend the functionality of Groups to the front-end.:)
Although i haven’t tried anything similar, i would suggest you to create a form that would render the groups form found in the meta box. I’m not sure if you can render a meta box in front-end, but an HTML form would do the same. After all the meta box is an empty element with a form.
However, have a look for example at Groups_Access_Meta_Boxes::groups( $object = null, $box = null ) to find out what exactly is rendered when you edit a post and replicate it for the front-end.
I will also try to implement something similar to Groups_Access_Meta_Boxes::groups( $object = null, $box = null ) but i can’t give you an ETA.
Kind regards,
George