Menu end: how to add custom button or float menu items to the right

Hi,

With TaskHive, when the request plugin is disabled the coressponding buttons on the right of the menu are gone also. What’s not gone is the section header-navbar__end and the menu is centered - that looks odd without the buttons to the right.

Is there a way to either move the menu to the right (removing header-navbar__end also removes the mobile menu item trigger) or to add a completely custom linkg/button instead of the request button (without the request plugin active)?

Hi,

This is the default design, and the middle section of the header is centered. If you want to move it to the right, use this CSS snippet; however, further customization may be required:

.header-navbar__middle {
  display: flex;
  justify-content: flex-end;
  flex-grow: 1;
}

.header-navbar__end {
	flex: none;
  padding-left: 0; 
}

You can also add custom links to this section in Appearance > Menus > Header. If you need to add a button, the customization would be required in this case.

Hope this helps.

Hi,

Hi,

How can I add a custom link to header-navbar__end? The “header” menu is only adressing the section header-navbar__middle.

You can use this code snippet:

add_filter(
 'hivepress/v1/templates/site_header_block',
	function ( $template ) {
		return hivepress()->template->merge_blocks(
			$template,
			[
				'site_header_menu' => [
					'blocks' => [
						'custom_link' => [
							'type'    => 'content',
							'content' => 'your_content_here',
							'_order'  => 1,
						],
					],
				],
			]
		);
	},
 1000
);

And this guide on how to create the button and adjust it to your needs: How to add a WhatsApp button - HivePress Help Center.

Please note that further customization may be required. If you’re comfortable with coding, you can customize it yourself or with the help of our AI assistant.

Hope this helps.

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