-
-
Save hivepress/847da5ecfe798084d43a232f791419c5 to your computer and use it in GitHub Desktop.
| <?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 !
Hello colleagues... I tried the code below as suggested, but it didn't work for me... What has changed since 2022, given that we are now in August 2025 and I am using version 1.7.13 of HivePress (ListingHive). At first, I just want to limit the images to 3 per ad, even if it's free, and in the future, for paid ads, limit it to 10 or more. I look forward to your suggestions... Thank you!
The code snippet is still valid, please make sure that you changed 123 to a lower number and tested uploading more images than the set limit. If you want to monetize the image limit, you can consider the Memberships extension.

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.