Confused on which template to modify

I’m trying to add one sentence to the single page listing items as shown here:

I can’t figure out which template file to copy to my child theme and overwrite?

Hi,

Please follow this guide on How to customize templates - HivePress Help Center

Alternatively, you can use this code snippet:

add_filter(
	'hivepress/v1/templates/listing_view_page/blocks',
	function ( $blocks, $template ) {
		
			$blocks = hivepress()->template->merge_blocks(
				$blocks,
				array(
					'listing_details_primary' => array(
						'blocks' => array(
							'modified_date' => array(
								'type'    => 'content',
								'content' => 'customtexthere',
								'_order'  => 15,
							),
						),
					),
				)
			);

		return $blocks;
	},
	1000,
	2
);
1 Like

Thank you for this. It works except it puts the text above the stars rating. I saw the guide before but I don’t see any good options for a single listing page. It doesn’t have any blocks for stars rating etc.

Hi @mjrogersace,

If the snippet provided above almost works for you, simply tweak this part:

'_order'  => 15,

Try a higher number like 20 or 25 until you find the position that looks best.

I hope this helps!

Cheers,
Chris :victory_hand:

1 Like

As ChrisB mentioned, please try changing the order parameter to a higher number

Hope it helps

1 Like

Thank you, this did the trick!

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