Last active
February 27, 2024 09:46
-
-
Save hivepress/847da5ecfe798084d43a232f791419c5 to your computer and use it in GitHub Desktop.
Change the maximum number of images per listing #hivepress #listings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'hivepress/v1/models/listing', | |
function( $model ) { | |
$model['fields']['images']['max_files'] = 123; | |
return $model; | |
}, | |
100 | |
); |
Any way to have different limits depending on the listing package purchased?
Please replace "listing" with "request" in the hook name then this snippet should work fine for requests.
Unfortunately there's no way to limit this per package in the current version.
Work perfectly. Thanks !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, it's not possible for the listing image gallery yet, but it's possible to add video URLs to the listing description (e.g. YouTube, Vimeo...) and they will be converted into a video player on the listing page. Also you can use the Embed attributes in the same way.