how Do i change tag H1 from site name
-
Hello,
Sorry my english is very very bad.
I try to change the tag “name of the site” by changing the simplecatch_headerdetails function.
So that when I am in the home the tag is <h1>, otherwise it is replaced by the <p> tag.
I can not do it.this is the my simplecatch_headerdetails
function simplecatch_headerdetails() { //delete_transient( 'simplecatch_headerdetails' ); global $simplecatch_options_settings; $options = $simplecatch_options_settings; if ( ( !$simplecatch_headerdetails = get_transient( 'simplecatch_headerdetails' ) ) && ( empty( $options[ 'remove_header_logo' ] ) || empty( $options[ 'remove_site_title' ] ) || empty( $options[ 'remove_site_description' ] ) ) ) { echo '<!-- refreshing cache -->'; $simplecatch_headerdetails = '<div class="logo-wrap">'; if(is_home()): $openTagTitle = '<h1 id="site-title">'; $closeTagTitle = '</h1>'; $openTagDes = '<h2 id="site-description">'; $closeTagDes= '</h2>'; else : $openTagTitle = '<p id="site-title">'; $closeTagTitle = '</p>'; $openTagDes = '<p id="site-description">'; $closeTagDes= '</p>'; endif; if( empty( $options[ 'remove_header_logo' ] ) || empty( $options[ 'remove_site_title' ] ) ) { $simplecatch_headerdetails .= $openTagTitle.'<a href="'.esc_url( home_url( '/' ) ).'" title="'.esc_attr( get_bloginfo( 'name', 'display' ) ).'">'; if( empty( $options[ 'remove_header_logo' ] ) ) { if ( !empty( $options[ 'featured_logo_header' ] ) ): $simplecatch_headerdetails .= '<img src="'.esc_url( $options['featured_logo_header'] ).'" alt="'.get_bloginfo( 'name' ).'" />'; else: // if empty featured_logo_header on theme options, display default logo $simplecatch_headerdetails .='<img src="'. get_template_directory_uri().'/images/logo.png" alt="logo" />'; endif; } if ( empty( $options[ 'remove_site_title' ] ) ) { $simplecatch_headerdetails .= '<span>'.esc_attr( get_bloginfo( 'name', 'display' ) ).'</span>'; } $simplecatch_headerdetails .= '</a>'.$closeTagTitle; } if( empty( $options[ 'remove_site_description' ] ) ) { $simplecatch_headerdetails .= $openTagDes.''.esc_attr( get_bloginfo( 'description' ) ).''.$closeTagDes; } $simplecatch_headerdetails .= '</div><!-- .logo-wrap -->'; set_transient( 'simplecatch_headerdetails', $simplecatch_headerdetails, 86940 ); } echo $simplecatch_headerdetails; } // simplecatch_headerdetails
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how Do i change tag H1 from site name’ is closed to new replies.