Hello,
i’d like to add fields to mediapress galleries. Is this possible ?
Best regards
ChristopheHi Christophe,
Thank you for the question.It is not doable out of the box. With some custom development, this may be achieved.
Regards
BrajeshThank you Brajesh
Do you have an example of what i should do ?
Best regards
Christophe
Hi Christophe,
I am sorry for the delayed reply.Her is an addon that shows how to add custom field on the gallery create screen
https://github.com/mediapress/mpp-gallery-categories/blob/master/mpp-gallery-categories.php
Hope that helps.
Regards
BrajeshHi Brajesh
this addon just adds specific categories to mediapress. It’s not what i’m looking for. I’m really surprised that such a function does not exist.
Do you have another solution ?
Best regards
Christophe
Hi Brajesh
I found a solution. It will be more efficient if your developper could had a hook after de </form> line 69 in wp-content\plugins\mediapress\templates\mediapress\default\gallery\manage\settings.php.
Do you believe that could be done in the next release ?
Best regards
Christophe
Hi Christophe,
Sure, but why not use the available hooks?mpp_after_edit_gallery_form_fields
or
mpp_before_edit_gallery_form_submit_field
These are already on that page.
Regards
Brajeshbecause it would make a form in a form and it does not work properly
Having multiple forms for the user on same page may not be a good idea.
We provided the hook to let you add your own fields(input fields and not forms).
And you can attach with the ‘mpp_gallery_updated’ hook to save the details.
I will still add the hook if it helps you.
Regards
BrajeshI know that having to forms on a page is not a good idea. When i use the acf_form function with create form option to false it does not create the acf form.
The problem is in this case, that when i click the mediapress save button, it saves the acf fields (with no need to write any code for that) but not mpp fields .
Thx for your patience 😉
You must be logged in to reply to this topic.