Puzzled on error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leehughes
Forum Newbie
Posts: 1
Joined: Mon Jan 30, 2012 1:11 am

Puzzled on error

Post 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?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Puzzled on error

Post by social_experiment »

leehughes wrote:Any advice?
Paste the error here, i visited the site and saw no error
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: Puzzled on error

Post 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
Post Reply