Page 1 of 1

Puzzled on error

Posted: Mon Jan 30, 2012 1:15 am
by leehughes
Hi,

I'm using the following code to try and pull the post images from single posts and publish them on a page.

Code: Select all

function photos() {
	if (is_page('lee')) return;
	
	global $post;
	echo '<div id="photo">';
	$the_query = new WP_Query( array (
		'category_name' => 'prom',
		'numberposts' => 10 ) );
	
	for( $i = 0; $i <= $the_query->post_count; $i++ ):
		echo '<div class="col">';
			$the_query->the_post();
			$image = get_post_meta( $post->ID, 'thesis_post_image', true );
	
			echo '<a href="' . get_permalink() . '">';
				echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/lib/scripts/thumb.php?w=200&h=200&zc=1&q=100&src=' . $image . '"/>';
			echo '</a>';
			echo '<a href="' . get_permalink() . '">';
				the_title();
			echo '</a>';
		echo '</div>';
	endfor;
	
	echo '</div>';
}
add_action( 'thesis_hook_before_post', 'photo' );



I'm getting the following error though http://the-ephemeral-project.com/lee/ I don't know where I have gone wrong..

Any advice?

Re: Puzzled on error

Posted: Mon Jan 30, 2012 3:35 pm
by social_experiment
leehughes wrote:Any advice?
Paste the error here, i visited the site and saw no error

Re: Puzzled on error

Posted: Mon Jan 30, 2012 4:20 pm
by twinedev
Well you are getting javascript errors on the page, but don't think that is what you were asking here about... I also couldn't tell what the php error was.

-Greg