Target custom listings page

Hello,

after setting a specific page in hivepress-settings as listings page (example.com/listingspagename) how can i target only this page?

I want to add some text above listings overview it but i can’t find a way to target only this.

For categories i’m using this to set different text for each category link:

add_action(
	'template_redirect',
	function() {
		if ( is_tax( 'hp_listing_xy','categoryZ' ) ) {
			add_filter(
				'hivepress/v1/templates/listings_view_page',
				function( $template ) {
					return hivepress()->helper->merge_trees(
						$template,
						[
....

I tried the same but with

if ( is_page( 'listingspagename') ) {

but didn’t work.

If i leave the if statement completely empty it overrides the text for all categories…

Please try this hook to customize listings page hivepress/v1/templates/listings_view_page
Here are more details about the hook Filter: hivepress/v1/templates/{template_name} | HivePress Hook Reference

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