Home Forums WoodMart support forum Changing the default "H" value for the title section Reply To: Changing the default "H" value for the title section

#33435

Artem Temos
Keymaster

Add this code to the functions.php file in the child theme and edit it

	function woodmart_get_header_links() {
		$links = array();

		if( ! woodmart_woocommerce_installed() || !woodmart_get_opt( 'header_links' ) && !woodmart_get_opt( 'topbar_links' ) ) return $links;

		$account_link = get_permalink( get_option('woocommerce_myaccount_page_id') );

		$color_scheme = ( woodmart_get_opt( 'header_dropdowns_dark' ) ) ? 'light' : 'dark';

		$current_user = wp_get_current_user();

		if( is_user_logged_in() ) {
			$links['my-account'] = array(
				'label' => esc_html__('My Account', 'woodmart'),
				'url' => $account_link,
				'dropdown' => '
					<div class="sub-menu-dropdown color-scheme-' . $color_scheme . '">
						' . woodmart_get_my_account_menu() . '
					</div>
				'
			);
			if ( woodmart_get_opt( 'links_with_username' ) ) {
				$links['my-account']['label'] = sprintf( esc_html__( 'Hello, %s', 'woodmart' ), '<strong>' . esc_html( $current_user->display_name ) . '</strong>' );
			}
		} else {
			$links['register'] = array(
				'label' => esc_html__('Login / Register', 'woodmart'),
				'url' => $account_link
			);

			if( woodmart_get_opt( 'login_dropdown' ) ) {
				$links['register']['dropdown'] = '
					<div class="sub-menu-dropdown color-scheme-' . $color_scheme . '">
						<div class="login-dropdown-inner">
							<h3 class="login-title"><span>' . esc_html__('Sign in', 'woodmart') . '</span><a class="create-account-link" href="' . esc_url( $account_link ) . '">' . esc_html__('Create an Account', 'woodmart') . '</a>' . '</h3>
							' . woodmart_login_form( false, $account_link ) . '
						</div>
					</div>
				';
			}
		}

		return apply_filters( 'woodmart_get_header_links',  $links );
	}