Title on category page

Hi,
I am building a site for a client and he wanted the header removed from every page except the front page.
Now, he needs a title on the various category pages (see screenshot).
How can I add a title under the search bar?

Looking forward to your reply.
Best regards
Christian

Hi,

By default, the category page already has a title and description Screenshot by Lightshot

If you want to add a title behind the search bar, as shown on your screenshot - there’s no simple snippet to do that and it will require customization.

Hi Serhil,
Yes, I am aware that there is by default a title and description in each category page, but as I wrote in my first message, my client wanted the header removed from the category pages and only keep it on the front page as it caused issues with his category images.
If I want to modify the theme to add a title below the search bar, which file do I need to edit?

And, on another note, my client is also having issues when uploading images. I have gone through your community and seen that there are a lot of other users who experience this same issue. Slow loading times, images not showing up until the page is refreshed and thumbnails only displays randomly when creating a listing.
I know Hivepress uses the native Wordpress image upload, but to be honest, this should be better. For this kind of plugin/theme, where the users mainly rely on visuals, this seems to me like a very important feature to have working properly.
Do you have any information as to when this issue will be resolved?

Best regards
Christian

If you removed the built-in category header, it’s possible to insert a custom template part but this requires customizations. There are 2 ways:

  1. Using a custom code snippet. HivePress uses arrays of blocks instead of plain HTML files to prevent maintenance issues, this way you can target a specific block and keep any customizations compatible with HivePress updates. Here’s a sample snippet:
add_filter(
	'hivepress/v1/templates/listings_view_page',
	function( $template ) {
		if ( is_tax( 'hp_listing_category' ) ) {
			$template = hivepress()->template->merge_blocks(
				$template,
				[
					'page_content' => [
						'blocks' => [
							'my_custom_block' => [
								'type'    => 'content',
								'content' => '<h1>' . esc_html( get_queried_object()->name ) . '</h1>',
								'_order'  => 1,
							],
						],
					],
				]
			);
		}
		return $template;
	}
);
  1. Using the block editor in HivePress/Templates. This doesn’t require code changes but the created template completely overrides the HivePress one, and if we add some feature to the template it will not appear without editing this custom template. Here’s an example Overview | HivePress Templates - YouTube

Thanks for your feedback regarding the image uploading, unfortunately we can’t do anything about the core function media_handle_upload() | Function | WordPress Developer Resources but we found a way to resolve some of these issues by limiting the number of concurrent uploads to 2 (previously there was no limit so selecting multiple images terminated the uploading on some hosting plans), the update will be released this weekend.

Hope this helps.

1 Like

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