Hide title on listings page

In this topic, code is provided to hide the listing title from the listing view page.

  1. What is the code required to hide the titles from the listings page?
  2. Is it possible to remove the title requirement when a listing is added?

Hi,

  1. Please provide more details on where exactly you want to hide the listing title because the code in the link hides the listing title on the listing page.

  2. Please use these PHP snippets:

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		unset( $form['fields']['title'] );
		
		return $form;
	},
	1000
);

add_filter(
	'hivepress/v1/models/listing',
	function( $model ) {
		$model['fields']['title']['required'] = false;

		return $model;
	},
	1000
);

Thank you andrii! The PHP snippets does the job and avoids the requirement to hide the listing title on any page on the website.

1 Like

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