Meteor Slides
meteor slides twenty eleven php header implementation? (3 posts)

  1. littlecuriosity
    Posted 3 years ago #

    Hi Josh,
    I think your plugin looks fantastic, but I can't get it to work on my site. http://artygirl.co.uk/personal/
    I'm using a child theme over the theme twenty eleven but when I overwrite the php for the header I get the following error.

    Parse error: syntax error, unexpected T_ELSE in /home/artygirl/public_html/wp-content/themes/Artygirl 2012 Personal Test Theme/header.php on line 1

    This is the code I overwrote -

    				// Check to see if the header image has been removed
    				$header_image = get_header_image();
    				if ( ! empty( $header_image ) ) :
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    					// 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 : ?>
    					<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 ?>
    			<?php endif; // end check for removed header image ?>
    				// Has the text been hidden?
    				if ( 'blank' == get_header_textcolor() ) :

    Thanks for your help



  2. littlecuriosity
    Posted 3 years ago #

    Just read this and realized I'd not turned off the header image and only need to paste in that code above the nav.


    Brilliant stuff!

    Thanks Judi :-)

  3. Josh Leuze
    Plugin Author

    Posted 3 years ago #

    Hi Judi, thanks for trying out my plugin, glad to hear you got it working!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic