Add job expiration date to the listing page

Hi,

Ihor suggested posting in here to ask for this.

I’d like to be able to pull the job posting expiry date automatically into the job posting description field.

Thanks

Please try this PHP snippet, but please note that it can require further customization. If you are not familiar with the code customization, then please consider hiring someone for custom work https://fvrr.co/32e7LvY

add_filter(
	'hivepress/v1/models/listing/fields',
	function( $fields, $listing ) {
		$expired_time = get_post_meta($listing->get_id(), 'hp_expired_time', true);
		
		if(!$expired_time){
			return $fields;
		}
		
		$fields['expired_time']['_display_areas'] = ['view_page_secondary'];
		$fields['expired_time']['display_template'] = '<strong>Expired time</strong>: '.date('d-m-Y', $expired_time);

		return $fields;
	},
	1000,
	2
);

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