Not showing hp-listing__categories

hi,

As you can see in the photo i attached, the system not showing catogory in listings view, what could i do?

Only allow me show attributes but not catogory.

thanks for the support.

Please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin (e.g. LiteSpeed), make sure that caching is disabled for logged-in users.

If the issue persists please send more details that may help to detect or reproduce this issue (e.g. a link to your site, screenshots, a list of installed plugins, or the error message you get).

Listing blocks do not show listing categories by default in TaskHive Services – TaskHive If you want to change it then please try this PHP snippet

add_filter(
	'hivepress/v1/templates/listing_view_block',
	function ($template){
		return hivepress()->helper->merge_trees(
				$template,
				[
					'blocks' => [
						'listing_details_primary' => [
							'blocks' => [
								'listing_category' => [
									'type'   => 'part',
									'path'   => 'listing/view/listing-categories',
									'_order' => 10,
								],
							],
						],
					],
				]
			);
	},
	1000
);

Also, please don’t share the login credentials here, this forum is public and I highly recommend changing the shared password.

Thanks friend, i will not share here, but then where i can send you my credentials?

about the snippet it not working editing inside function.php.
what ca i do?

it woked but with this code:

add_filter(
	'hivepress/v1/templates/listing_view_block/blocks',
	function( $blocks, $template ) {
		return hivepress()->helper->merge_trees(
			[ 'blocks' => $blocks ],
			[
				'blocks' => [
					'listing_content'         => [
						'blocks' => [
							'listing_category' => [
								'type'   => 'part',
								'path'   => 'listing/view/listing-categories',
								'_order' => 5,
							],
						],
					],

					'listing_details_primary' => [
						'blocks' => [
							'listing_category' => [
								'type' => 'content',
							],
						],
					],
				],
			]
		)['blocks'];
	},
	1000,
	2
);

2 question:

where i can send you my credentials in the future?
do you have a tutorial to design my own snippet? thanks for the response!

If you need to share the WP credentials, please send them via email to support@hivepress.io

We have a few developer resources, e.g. you can check the sample code snippets here Search · user:hivepress · GitHub or check the available actions/fiilters here Home | HivePress Hook Reference

Hope this helps.

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