Add Subtitles and Descriptions New Listing Form

Hi there,

  1. I’d like to add a Subtitle within the new listing form so the content is better structured. I read in the community that you can override the template on hivepress>templates but I can’t find the blocks needed in there so I cannot create the listing form as I have it now including the subtitles I’m looking to add.

  2. As you can see on the screenshot some fields have descriptions, I add them by using the following code snipet:

add_filter(
‘hivepress/v1/models/listing’,
function( $model ) {
$model[‘fields’][‘title’][‘min_length’] = 18;
$model[‘fields’][‘title’][‘max_length’] = 56;
$model[‘fields’][‘title’][‘description’] = ‘Mín. 18 carac. / Máx. 56 carac.’;
$model[‘fields’][‘description’][‘min_length’] = 375;
$model[‘fields’][‘description’][‘max_length’] = 1056;
$model[‘fields’][‘description’][‘description’] = ‘Mín. 375 carac. / Máx. 1056 carac.’;
$model[‘fields’][‘images’][‘description’] = ‘Sube imagenes de tu actividad. Por favor, use únicamente imágenes horizontales’;
$model[‘fields’][‘price’][‘description’] = ‘Pon un precio a tu actividad’;
return $model;
}
);

But the problems comes when I try to add a description for PRECIO (price) and ENTRADA (this is the required field you enable when you select hivepress>settings>listings>Require file attachments. I tried with:

add_filter(
‘hivepress/v1/models/listing’,
function( $model ) {
$model[‘fields’][‘price’][‘description’] = ‘test’;
$model[‘fields’][‘attachments/upload-attachments/file/files’][‘description’] = ‘test’;
return $model;
}
);

But it doesn’t work

add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		if ( isset( $attributes['price'] ) ) {
			$attributes['price']['edit_field']['description'] = 'Write your description here';
		}
 
		return $attributes;
	},
	1000
);