Hello there, i can’t seem to find a way to limit free packages to X per month. Currently users can list an unlimited number of free listings. If i do limit them to a number of free listings they will be forced to pay to list when they have used up the number of free listings. This would turn away free listers from the website which is not be beneficial for growth
Hi,
Unfortunately, there is no such feature, it will require a custom implementation. You can restrict the publication of the listing to a package and specify an expiration date. If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work Customize your website | HivePress
It is fine i will make do with the theme default function. I now require a small customization. How do i remove fields in a certain category at submit listing form? I would like to remove location,title,description and images for category ID 262 but leave the other category as it is. I have tried for many hours and only able to achieve on removing location field but not title,description and images. Thank you
Please try this code snippet, it should remove the Images field for category with ID 262:
add_filter(
'hivepress/v1/forms/listing_update',
function ( $form_args, $form ) {
$listing = $form->get_model();
if ( ! $listing ) {
return $form_args;
}
if ( in_array( 262, (array) $listing->get_categories__id() ) ) {
unset( $form_args['fields']['images'] );
}
return $form_args;
},
1000,
2
);
Removing required fields like title and description is more tricky and requires further customizations, please note that listings without titles may also cause issues if other features depend on non-empty titles.
Hope this helps