Forums

Twenty-Ten : Want to lose the blog title and make the header image clickable to (4 posts)

  1. Calpurnius
    Member
    Posted 1 year ago #

    Suggestions?

  2. wpweaver
    Member
    Posted 1 year ago #

    That stuff is pretty hardwired into Twenty Ten. You can hide the title by editing the style.css, but making the image clickable would require building a child theme and editing header.php.

    My new Twenty Ten child theme, Twenty Ten Weaver, lets you hide the title, but the current version doesn't make the image clickable. Perhaps I can add that feature for the next version.

  3. brashrat
    Member
    Posted 1 year ago #

    See this thread for removing title/description in default Twenty Ten theme:

    http://wordpress.org/support/topic/411707?replies=4

  4. MAS
    Member
    Posted 1 year ago #

    remove this snapshot code from header.php file:

    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    				<<?php echo $heading_tag; ?> id="site-title">
    					<span>
    						<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    					</span>
    				</<?php echo $heading_tag; ?>>
    				<div id="site-description"><?php bloginfo( 'description' ); ?></div>

    And add this code:

    <?php
    					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    					if ( is_singular() &&
    							has_post_thumbnail( $post->ID ) &&
    							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						echo '<a href="'. home_url( '/' ).'" title="'.esc_attr( get_bloginfo( 'name', 'display' ) ).'" rel="home">'.get_the_post_thumbnail( $post->ID, 'post-thumbnail' ).'</a>';
    					else : ?>
    						<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" border="0"/></a>
    					<?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic