BuddyDev

Search

Adding MediaPress to static frontend page?

  • Participant
    Kevin on #13500

    Hi again,

    My second post in quick succession, apologies – I’m completely new to MediaPress but not WordPress in general!

    As I explained in my previous post, I have a frontend page which allows users to create a nomination (post type on my site) and I use some custom code that I found here – https://buddydev.com/support/forums/topic/adding-a-gallery-automatically-on-post-creation/#post-12717 to create an associated MediaPress gallery. I changed the function slightly so that it returns the ID of the associated gallery.

    This works fine in that the gallery is created. However I mistakenly thought that in order to get the user to edit their gallery, all I would need to do was use the mpp_upload shortcode with the gallery ID I created. This is my code:

    
    $gallery_id = mpp_custom_create_update_associated_gallery($nomination_id);
    echo do_shortcode('[mpp-uploader gallery_id='.$gallery_id.']');
    

    Obviously I now know that this just renders the uploader, not the full editor, so my question is how do I render the full gallery editor with all the controls for re-ordering etc on this static page?

    Again, much appreciated
    Kevin

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #13507

    Hi Kevin,
    Thank you for posting.

    All you need is a front end editing capability for the gallery. It is easy. MediaPress has it built into the plugin.

    I will suggest creating a page that lists the galleries of the logged in user. I just checked our shortcode for listing gallery. It lacks the capability to do that. I will add it and release an update.

    Or you can always use MPP_Gallery_Query() (It extends WP_Query and will feel a lot like that).

    https://buddydev.com/mediapress/topics/api-reference/core/mpp_gallery_query/

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved