Tagged: galery-cover
I want the image gallery cover to be the same all the time. Now it changes to the first image uploaded. How can I avoid that?
- This topic was modified 8 years, 2 months ago by Brajesh Singh. Reason: Updating Titlte
- This topic was modified 8 years, 2 months ago by Brajesh Singh. Reason: Updating Title/Description
Hi Jaume,
Can you please post a screenshot? Do you mean the Gallery cover image?Yes, the gallery cover image. How can I upload an image here?
Hi Jaume,
Please use any 3rd party service like imgur etc.What/Where is the function that creates the new gallery cover image on image upload to block it and keep the original gallery cover image used on gallery creation, please? How do I stop it from changing the image?
Hi Jaume,
At the moment I haven’t provided a hook to stop it. You can see the actual implementation herehttps://github.com/buddydev/mediapress/blob/master/core/gallery/mpp-gallery-cover-templates.php#L32
When a cover image is fetched for the gallery and if It does not exist, we check if the gallery is of type photo and then set the first image as the cover.
I am adding a hook for future today, for now, You will need to remove that chunk of code.
Hope that helps.
For future, I have added filter ‘mpp_gallery_auto_update_cover’. It can be easily disabled like this
add_filter('mpp_gallery_auto_update_cover', '__return_false' );
Regards
BrajeshI have updated the title of the topic to reflect the intention correctly.
Great. Thanks. I’ll add the filter to my functions file for future releases and tweak the code by now! 😉
The topic ‘ [Resolved] How to Disable Automatic update of MediaPress Gallery Cover’ is closed to new replies.