Create TITLE for listing out of Attributes?

Hello, I was wondering if its possible for the website to create the TITLE for listing from the options the user selects when filling the ADD LISTINGS form?

I have a used car website and I would like the TITLE of each user’s listing to contain the YEAR, MAKE, MODEL of the car. Currently the form asks the user to add the TITLE and the I have the year, make, model attributes which the user has to fill. Can I, instead, get the attribute data from the user in the for and make the TITLE automatically? Is it too hard to do?

I had another question: is it possible to add Placeholder text in the TITLE field on the ADD LISTING form?

  1. If you want to generate titles based on some attributes please set the listing title format in HivePress/Settings/Listings, for example: %listing.attribute_field_name_here%

  2. Please try this PHP snippet

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		if ( isset( $form['fields']['title'] ) ) {
			$form['fields']['title']['placeholder'] = 'custom text here';
		}

		return $form;
	},
	1000
);

Thanks @yevhen both the solutions work! One thing though, when I use the %listing.attribute_field_name_here% format, it seems to be using my Attribute Display settings (which are currently set as %label%: %value%) so the output in the title is “Year: 2000 Make: GM Model: Optra” instead of “2000 GM Optra”. Any workaround for this?

Unfortunately there’s no solution to this at the moment, but we plan to add multiple display formats per attribute in future updates.

No worries, thank you for all the help!

Hello,

Is it possible to set a one different title type for each different category of listings we have ?

Thank you in advance.

Zak.

1 Like

There’s no such feature yet, but it makes sense - we’ll consider adding it, thanks. It’s also possible with customizations (if you’re familiar with WordPress customizations or have a developer for custom work).

1 Like

Thanks for the response.

Yes indeed it could be very interesting to have homogeneous listings.

Zak.

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