Home › Forums › Themes Support › Claue › Heading tags
- This topic has 3 replies, 2 voices, and was last updated 3 years, 8 months ago by Harry.
-
AuthorPosts
-
-
August 10, 2020 at 8:54 pm #38002ozgunSupport Expired
I want to H1 tags on my home pages and product categories. I plan to add H1 to my logo as <h1> -img src=”xxxxx.png” alt=”…………” /-</h1>.
I could not find any heading tags on homepage and product categories. On product page, listing title is h1. I changed it as h2 using woocommerce>title.php.
How can I cretae h1 tags to my logo? Also is there any way to edit heading tags manually?
Thanks.
- This topic was modified 3 years, 8 months ago by ozgun.
-
August 10, 2020 at 10:51 pm #38008HarrySupport Expired
Hi Ozgun,
1. Please add below code to claue-child > functions.php
if ( ! function_exists( 'jas_claue_logo' ) ) { function jas_claue_logo() { $output = ''; $output .= '<div class="jas-branding ts__05">'; $output .= '<a class="db" href="' . esc_url( home_url( '/' ) ) . '">'; if ( ! cs_get_option( 'header-transparent' ) ) { if ( cs_get_option( 'logo' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo' ), 'full', true ); $output .= '<img class="regular-logo normal-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; if ( cs_get_option( 'logo-sticky' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo-sticky' ), 'full', true ); $output .= '<img class="sticky-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; } } else { $output .= '<img class="regular-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } if ( cs_get_option( 'logo-retina' ) ) { $logo_retina = wp_get_attachment_image_src( cs_get_option( 'logo-retina' ), 'full', true ); $output .= '<img class="retina-logo normal-logo" src="' . esc_url( $logo_retina[0] ) . '" width="' . esc_attr( $logo_retina[1] ? $logo_retina[1] / 2 : '' ) . '" height="' . esc_attr( $logo_retina[2] ? $logo_retina[2] / 2 : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; } else { $output .= '<img class="retina-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo-2x.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } } else { if ( cs_get_option( 'logo-transparent' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo-transparent' ), 'full', true ); $output .= '<img class="regular-logo normal-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; if ( cs_get_option( 'logo-sticky' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo-sticky' ), 'full', true ); $output .= '<img class="sticky-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; } } else { $output .= '<img class="regular-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } if ( cs_get_option( 'logo-transparent-retina' ) ) { $logo_retina = wp_get_attachment_image_src( cs_get_option( 'logo-transparent-retina' ), 'full', true ); $output .= '<img class="retina-logo normal-logo" src="' . esc_url( $logo_retina[0] ) . '" width="' . esc_attr( $logo_retina[1] ? $logo_retina[1] : '' ) . '/2" height="' . esc_attr( $logo_retina[2] ? $logo_retina[2] : '' ) . '/2" alt="' . get_bloginfo( 'name' ) . '" />'; } else { $output .= '<img class="retina-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo-2x.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } } $output .= '</a>'; $output .= '</div>'; echo apply_filters( 'jas_claue_logo', $output ); } }
and add H1 tag where you want
2. If you want to change H1 tag on categories page, please copy file archive-product.php in claue > core > libraries > vendors > woocommerce > template to claue-child > woocommerce and change code in line 87
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
August 10, 2020 at 11:14 pm #38011ozgunSupport Expired
Thanks much for your help, Harry.
I have three questions:
1- I added the code to functions.php but where can I add h1 tags? Which file I must add to? Can you give me an example to put h1?
2- In claue child, there is no woocommerce folder. There are only fuctions.php and style.css
3- In the code there are two times of logo.png and two times of logo-2x.png. Can I change the code from logo.png to logo-2x.png?
Thanks.
- This reply was modified 3 years, 8 months ago by ozgun.
-
August 10, 2020 at 11:56 pm #38013HarrySupport Expired
Hi Ozgun,
1. Please change code to
if ( ! function_exists( 'jas_claue_logo' ) ) { function jas_claue_logo() { $output = ''; $output .= '<div class="jas-branding ts__05"><h1>'; $output .= '<a class="db" href="' . esc_url( home_url( '/' ) ) . '">'; if ( ! cs_get_option( 'header-transparent' ) ) { if ( cs_get_option( 'logo' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo' ), 'full', true ); $output .= '<img class="regular-logo normal-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; if ( cs_get_option( 'logo-sticky' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo-sticky' ), 'full', true ); $output .= '<img class="sticky-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; } } else { $output .= '<img class="regular-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } if ( cs_get_option( 'logo-retina' ) ) { $logo_retina = wp_get_attachment_image_src( cs_get_option( 'logo-retina' ), 'full', true ); $output .= '<img class="retina-logo normal-logo" src="' . esc_url( $logo_retina[0] ) . '" width="' . esc_attr( $logo_retina[1] ? $logo_retina[1] / 2 : '' ) . '" height="' . esc_attr( $logo_retina[2] ? $logo_retina[2] / 2 : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; } else { $output .= '<img class="retina-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo-2x.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } } else { if ( cs_get_option( 'logo-transparent' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo-transparent' ), 'full', true ); $output .= '<img class="regular-logo normal-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; if ( cs_get_option( 'logo-sticky' ) ) { $logo = wp_get_attachment_image_src( cs_get_option( 'logo-sticky' ), 'full', true ); $output .= '<img class="sticky-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />'; } } else { $output .= '<img class="regular-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } if ( cs_get_option( 'logo-transparent-retina' ) ) { $logo_retina = wp_get_attachment_image_src( cs_get_option( 'logo-transparent-retina' ), 'full', true ); $output .= '<img class="retina-logo normal-logo" src="' . esc_url( $logo_retina[0] ) . '" width="' . esc_attr( $logo_retina[1] ? $logo_retina[1] : '' ) . '/2" height="' . esc_attr( $logo_retina[2] ? $logo_retina[2] : '' ) . '/2" alt="' . get_bloginfo( 'name' ) . '" />'; } else { $output .= '<img class="retina-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo-2x.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />'; } } $output .= '</a>'; $output .= '</h1></div>'; echo apply_filters( 'jas_claue_logo', $output ); } }
I already help you add H1
2. you need create folder woocommerce in claue-child
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.