I need to add a short legal disclaimer on the bottom of each listing page (and only on the individual listing pages).
I don’t see a theme template for the listing page.
I need to add a short legal disclaimer on the bottom of each listing page (and only on the individual listing pages).
I don’t see a theme template for the listing page.
Hi,
You have two options to add this text to your listings:
Rewrite the listing page in HivePress > Templates, please check the tutorial if you need more information - How to customize templates - HivePress Help Center
You can try these code snippets
How to add custom code snippets - HivePress Help Center
Thanks for the prompt reply @andrii
I have searched the community and scrolled through the 134 gists in Github for anything related to the individual listing template and I hadn’t seen anything.
I guess I should have been more specific about asking which child template in HivePress I can edit for the individual listings. It seems there are only a couple basic PHP files. Or would it be better served by creating a custom function?
Please try this code snippet:
add_filter(
'hivepress/v1/templates/listing_view_page',
function ( $template ) {
return hivepress()->template->merge_blocks(
$template,
[
'page_footer' => [
'blocks' => [
'disclaimer' => [
'type' => 'content',
'content' => 'custom text or HTML here',
'_order' => 1000,
],
],
],
]
);
},
1000
);
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.