WordPress.org

Ready to get started?Download WordPress

Forums

Why do i have a live link on my header and how do I get rid of it? (5 posts)

  1. tom2nz
    Member
    Posted 1 year ago #

    Hi can anybody tell me in dummies language with appropriate links provided, why do i have a live link on my http://thepeopleslaw.co.nz/ header? and how do I get rid of it?

    Thanks Tom

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    why?
    - because the theme is programmed that way; see code below.

    how do I get rid of it?
    - edit header.php;

    change this section:

    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    				<?php
    					// The header image
    					// 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 ), array( $header_image_width, $header_image_width ) ) ) &&
    							$image[1] >= $header_image_width ) :
    						// Houston, we have a new header image!
    						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					else :
    						// Compatibility with versions of WordPress prior to 3.4.
    						if ( function_exists( 'get_custom_header' ) ) {
    							$header_image_width  = get_custom_header()->width;
    							$header_image_height = get_custom_header()->height;
    						} else {
    							$header_image_width  = HEADER_IMAGE_WIDTH;
    							$header_image_height = HEADER_IMAGE_HEIGHT;
    						}
    						?>
    					<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
    				<?php endif; // end check for featured image or standard header ?>
    			</a>

    by removing the html link tag, to this:

    <?php
    					// The header image
    					// 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 ), array( $header_image_width, $header_image_width ) ) ) &&
    							$image[1] >= $header_image_width ) :
    						// Houston, we have a new header image!
    						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					else :
    						// Compatibility with versions of WordPress prior to 3.4.
    						if ( function_exists( 'get_custom_header' ) ) {
    							$header_image_width  = get_custom_header()->width;
    							$header_image_height = get_custom_header()->height;
    						} else {
    							$header_image_width  = HEADER_IMAGE_WIDTH;
    							$header_image_height = HEADER_IMAGE_HEIGHT;
    						}
    						?>
    					<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
    				<?php endif; // end check for featured image or standard header ?>

    caveat:
    an unedited default Twenty Eleven is important in case of problems
    - strongly consider to create a child theme to make the customisations; http://codex.wordpress.org/Child_Themes
    or download a Twenty Eleven child theme from this trusted source.

  3. tom2nz
    Member
    Posted 1 year ago #

    I ended up here:
    http://thepeopleslaw.co.nz/wp-admin/theme-editor.php?file=%2Fthemes%2Ftwentyeleven%2Fheader.php&theme=Twenty+Eleven&dir=theme

    and saw this:

    ""Edit Themes
    Twenty Eleven: Header (header.php)""

    [code moderated - the posted code was corrupted by the forum parser.
    please mark any posted code - or better, use the pastebin for large amounts - see http://codex.wordpress.org/Forum_Welcome#Posting_Code
    ]

  4. tom2nz
    Member
    Posted 1 year ago #

    I have downloaded this: http://quirm.net/themes/twenty-eleven-child/

    but not sure where to upload it to.

  5. tom2nz
    Member
    Posted 1 year ago #

    Do you want to cut some deal for replying in dummy language? EG every tiny step explained

Topic Closed

This topic has been closed to new replies.

About this Topic