How to limit the number of characters in the ad title?

How to limit the number of characters in the ad title?

I was reading the documentation and happened to just see this your asking.

<?php
add_filter(
	'hivepress/v1/models/listing',
	function( $model ) {
		$model['fields']['title']['max_length']   = 123;
		$model['fields']['description']['max_length']   = 123;

		return $model;
	}
);

It was destiny :upside_down_face:

1 Like

Thanks :open_mouth:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.